Channels and containers provide a method of transferring data between CICS® programs,
in amounts that far exceed the 32KB limit that applies to communication areas
(COMMAREAs).
Each container is a "named COMMAREA" that is not limited to 32KB. Containers
are grouped together in sets called channels.
The channel/container model has several advantages over the communication
areas (COMMAREAs) used by CICS programs to exchange data:
- Unlike COMMAREAs, channels are not limited in size. There is no limit
to the number of containers that can be added to a channel, and the size of
individual containers is limited only by the amount of storage that you have
available. Consider the amount of storage available to other applications
when you create large containers.
- Because a channel can comprise multiple containers, it can be used to
pass data in a more structured way, allowing you to partition your data into
logical entities. In contrast, a COMMAREA is a monolithic block of data.
- Unlike COMMAREAs, channels do not require the programs that use them to
know the exact size of the data returned.
- Channels can be used by CICS application programs written in any of the CICS-supported
languages. For example, a Java™ client program on one CICS region can
use a channel to exchange data with a COBOL server program on a back-end AOR.
- CICS automatically
destroys containers (and their storage) when they go out of scope.
There are also implications when using channels and containers in preference
to COMMAREAs:
- A channel can use more storage than a COMMAREA designed to pass the same
data. This is because:
- Container data can be held in more than one place.
- COMMAREAs are accessed by pointer, whereas the data in containers is copied
between programs.
For more information on using channels and containers within the JCA framework,
see Using the ECI resource adapters with channels and containers.
For more information on using channels and containers with ECI calls,
see Creating channels and containers for ECI calls.
For more information on channels and containers, see the CICS Transaction Server for z/OS® Channels
learning path.