BTS data-containers
A data-container is a named area of storage, maintained by BTS. Because data-containers are preserved across multiple activations of the activity, they can be used to hold state data or inputs and outputs for the activity. They are recoverable resources, written to disk as necessary, and restored at system restart.
Each data-container is associated with an activity or process. It is identified by its name and by the activity for which it is a container. An activity can have any number of containers, as long as they all have different names within the scope of the activity. For example, several activities can each have containers named “Input”, “Output”, and “State”.
Data-containers of an activity serve as its working storage. They can be read and updated by the activity itself, by the parent of the activity, or by a program that has “acquired” the activity.
Just like an activity, a process might have a set of data-containers associated with it. These are called process containers : every activity in the process can access them, but only the root activity, or a program that has “acquired” the process, can update them.
- Create and set the process containers
- Create and set the containers of the root activity.
Alternatively, the root activity can create and set the process containers.
Lifetime of data-containers
Data-containers of the activity have the same lifetime as the activity itself. They are only destroyed when the activity itself is destroyed. While a child activity exists, its data-containers are always accessible to its parent, whatever processing mode the child is in (including complete).
If you issue a DELETE ACTIVITY command against an activity, bear in mind that you destroy the containers of the activity. It is typically best to allow activities to be deleted automatically by CICS®. For child activities, this happens when the parent of the activity completes. At this stage, the parent no longer needs access to its children's containers. If the parent is reset and run again, it recreates its child activities.