Containers are named blocks of data designed for passing information between programs. You can think of them as “named communication areas (COMMAREAs)”. Programs can pass any number of containers between each other and the size of the containers is limited only by the amount of storage available.
Containers are grouped together in sets called channels. A channel is analogous to a parameter list.
To create named containers and assign them to a channel, a program uses EXEC CICS® PUT CONTAINER(container-name) CHANNEL(channel-name) commands. It can then pass the channel (and its containers) to a second program using the CHANNEL(channel-name) option of the EXEC CICS LINK, XCTL, START, or RETURN commands.
The second program can read containers passed to it using the EXEC CICS GET CONTAINER(container-name) command. This command reads the named container belonging to the channel that the program was invoked with.
If the second program is invoked by a LINK command, it can also return containers to the calling program. It can do this by creating new containers, or by reusing existing containers.
Channels and containers are visible only to the program that creates them and the programs they are passed to. When these programs terminate, CICS automatically destroys the containers and their storage.
Channel containers are not recoverable. If you need to use recoverable containers, use CICS business transaction services (BTS) containers. The relationship between channel and BTS containers is described in Channels and BTS activities. For detailed information about BTS, see the CICS Business Transaction Services manual.