Channels and containers
Containers are named blocks of data, designed for passing information between programs. Programs can pass any number of containers between each other. Containers are grouped in sets that are 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 by using the CHANNEL( channel-name ) option of the EXEC CICS LINK , XCTL , START , RUN TRANSID or RETURN commands.
The second program can read containers that are passed to it using the EXEC CICS GET CONTAINER ( container-name ) command. This command reads the named container that belongs to the channel that the program was invoked with.
If the second program is called by an EXEC CICS 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, or (for EXEC CICS FETCH CHANNEL commands) the program which fetches the channel. When these programs end, CICS® automatically destroys the containers and their storage. Programs can also issue commands to delete channels and containers before that time.
AMODE (64) programs can use channels and containers to transfer data in 64-bit storage in the same way, by using EXEC CICS PUT64 CONTAINER and EXEC CICS GET64 CONTAINER commands. These commands are for use only in non- Language Environment® (LE) AMODE(64) assembly language application programs, and CICS business transaction services (BTS) containers are not supported.
Channel containers are not recoverable. Pseudoconversational transactions that are started with RETURN TRANSID CHANNEL() cannot be restarted. If you must use recoverable containers, use CICS business transaction services (BTS) containers.
Programs running in
z/OS®
but outside of
CICS
can pass data to a
CICS
program by using channels and containers on the external
CICS
interface (EXCI), as an alternative to using a communications area.
The following commands are supported:
EXEC CICS DELETE
CHANNEL
,
EXEC CICS DELETE CONTAINER
,
EXEC CICS GET
CONTAINER
,
EXEC CICS MOVE CONTAINER
, and
EXEC CICS PUT
CONTAINER
. EXCI does not support
EXEC CICS PUT64 CONTAINER
and
EXEC CICS GET64 CONTAINER
commands.

Channels and containers used by an EXCI job will be freed when the
job ends. However,
good programming practice would be for the job to issue an
EXEC CICS DELETE
CHANNEL
command to delete a channel and its set of containers when the
channel is no
longer required. Otherwise, a subsequent use of EXCI within the same job
will have access to the
channel and its containers.

The transaction channel DFHTRANSACTION
Channels normally go out of scope when the link level changes. They might therefore not be available to all the programs in a transaction. If you create a channel with the name DFHTRANSACTION, it does not go out of scope when the link level changes. It is therefore available to all programs in a transaction, including any exit points that are API enabled. However, the transaction channel cannot be passed to a CICS region at a version earlier than CICS TS 5.2.
Transaction channels can only be used on MRO and IPIC link types.
Transaction channels are not supported for ISC over SNA link types.
DFHTRANSACTION can be used in all API commands that accept a channel name.
You cannot delete a transaction channel, so when you want to clean up use of data, delete containers from the channel rather than deleting the channel.
An EXCI job using channels and containers can use the transaction
channel
DFHTRANSACTION. The transaction channel with its container data is shipped to
CICS
in addition to the channel and its set of containers that are named
on the
EXEC CICS LINK
command or call level
DPL_REQUEST
. The
transaction channel is not shipped with COMMAREAS on an
EXCI EXEC CICS LINK
command or call level
DPL_REQUEST.

If you want to use a transaction channel in the EXCI client, the
channel must be
created in the EXCI client, not on the CICS server task. The transaction
channel has a lifetime of
the EXCI job. It will operate on the
CICS
server in the same
way as if the transaction channel was shipped by a DPL request from
another
CICS
system.

If an EXCI job passes a transaction channel to a
CICS
region at a version earlier than
CICS
TS 5.2, the
CICS
program will abend with abend code AXGA.
