Subscribe
THE DAILY DIGEST

The daily edition.

Essential reading from Rocket Enterprise. Straight to the source.

Archived edition
DAILY EDITION1 story· 4 min read

CICS Channels & Containers (Mainframe Subsystem Support)

In legacy IBM CICS application design, programs communicate across program links (EXEC CICS LINK, XCTL) and asynchronous task starts (EXEC CICS START) using the Communication Area (COMMAREA).

IN FOCUS

CICS Channels & Containers (Mainframe Subsystem Support)

In legacy IBM CICS application design, programs communicate across program links (EXEC CICS LINK, XCTL) and asynchronous task starts (EXEC CICS START) using the Communication Area (COMMAREA). [1]

Read the full briefing

1. Capability Overview & Problem It Solves

In legacy IBM CICS application design, programs communicate across program links (EXEC CICS LINK, XCTL) and asynchronous task starts (EXEC CICS START) using the Communication Area (COMMAREA).

However, the COMMAREA is constrained by a 16-bit halfword binary length descriptor to a maximum size of 32,767 bytes (32 KB). Passing large modern business payloads, multi-record tables, complex XML/JSON documents, or multiple distinct records previously forced developers to engineer complex data segmentation routines, write temporary staging records to Temporary Storage Queues (TSQs), or issue multiple chained calls.

Channels and Containers eliminate the 32 KB COMMAREA limit entirely (CICS Program Call with Channels and Containers). A Channel acts as a named parameter collection (similar to an envelope or briefcase), and a Container is an individual named data block of arbitrary size (ranging from single bytes to gigabytes) held within that channel.

Rocket Enterprise Server delivers full mainframe-compatible emulation of Channels and Containers across online CICS transactions, Distributed Program Links (DPL), and CICS Web Services (CWS).

2. Architecture & How It Works

  • Multi-Container Data Packaging:
    • Rather than flattening multiple unrelated data structures into an offset-delimited single COMMAREA, programs can create multiple named containers within a single channel (e.g., container CUSTOMER-HDR, container ITEMS-LIST, container SECURITY-TOKEN).
    • Programs pass the channel using the CHANNEL(name) parameter on EXEC CICS LINK, XCTL, START, or RETURN statements.
    • In the called program, the passed channel becomes the current channel. The program retrieves specific containers by name without needing to understand or parse the byte offsets of unrelated data structures.
  • Data Types & Code Page Conversion (CHAR vs. BIT): Containers are typed to manage character encoding across distributed platforms (CCSID Conversion Tables - Rocket Software Documentation):
    • DATATYPE(CHAR): Declares that the container contains text. When passing containers across heterogeneous nodes, DPL connections, or web service boundaries, Enterprise Server automatically converts the character payload between the source CCSID (e.g., EBCDIC IBM-37) and the target CCSID (e.g., ASCII IBM-437 or UTF-8).
    • DATATYPE(BIT): Declares raw binary data (such as packed-decimal fields COMP-3, binary integers COMP, or encrypted byte arrays). Enterprise Server preserves bit streams verbatim without code page transcoding.
  • Lifecycle and Memory Optimization:
    • Unlike TS queues, which require explicit deletion to prevent storage leaks, containers associated with an executive channel are automatically scoped to the task lifecycle and freed when the task terminates.
    • Programs can execute EXEC CICS MOVE CONTAINER to transfer data ownership between containers without allocating duplicate memory buffers, accelerating high-volume data pipeline processing.

3. Key Syntax, Configuration & Operational Directives

  1. Populating Containers and Calling a Program (PUT CONTAINER & LINK):
       WORKING-STORAGE SECTION.
       01  WS-CUST-RECORD.
           05  CUST-ID           PIC X(10) VALUE 'CUST000100'.
           05  CUST-NAME         PIC X(30) VALUE 'ACME CORPORATION'.
       01  WS-ORDER-DATA         PIC X(50000).
       01  WS-RESP               PIC S9(8) COMP.
       ...
       PROCEDURE DIVISION.
       * Create character container (undergoes CCSID conversion if shipped)
           EXEC CICS PUT CONTAINER('CUST-INFO')
                          CHANNEL('ORDER-CHANNEL')
                          FROM(WS-CUST-RECORD)
                          FLENGTH(LENGTH OF WS-CUST-RECORD)
                          CHAR
                          RESP(WS-RESP)
           END-EXEC.

       * Create binary container for large payload (> 32 KB)
           EXEC CICS PUT CONTAINER('ORDER-ITEMS')
                          CHANNEL('ORDER-CHANNEL')
                          FROM(WS-ORDER-DATA)
                          FLENGTH(LENGTH OF WS-ORDER-DATA)
                          BIT
                          RESP(WS-RESP)
           END-EXEC.

       * Link to target program passing the channel
           EXEC CICS LINK PROGRAM('ORDPROC')
                          CHANNEL('ORDER-CHANNEL')
                          RESP(WS-RESP)
           END-EXEC.
  1. Reading Containers in the Target Program (GET CONTAINER):
       WORKING-STORAGE SECTION.
       01  WS-CUST-IN            PIC X(40).
       01  WS-ACTUAL-LEN         PIC S9(8) COMP.
       01  WS-RESP               PIC S9(8) COMP.
       ...
       PROCEDURE DIVISION.
       * Retrieve the customer information container from current channel
           EXEC CICS GET CONTAINER('CUST-INFO')
                          INTO(WS-CUST-IN)
                          FLENGTH(WS-ACTUAL-LEN)
                          RESP(WS-RESP)
           END-EXEC.
  1. CCSID Configuration in ESCWA: When using character containers across ASCII-configured Enterprise Server regions, ensure the EBCDIC Local CCSID and ASCII CCSID mapping is defined in the region's System Initialization Table (SIT) and verified with the MFCCSIDMAP module (CCSID Conversion Tables - Rocket Software Documentation).

4. Reference Citations (Rocket Documentation 12.0)

Rocket Enterprise suite · 12.0 · Mixed product/platform sources
Documentation references
That’s the briefing.You’ve reached the end of this edition.
More editions

From the archive

View all
Oct 7

Mfsort — Mainframe Sort/Merge & ICETOOL Emulation

Oct 6

VSAM Emulation & IDCAMS / MFJAMS (with z/OS Extensions)

Oct 5

CICS Resource Definitions (RDO) — DEFINE TRANSACTION & DEFINE PROGRAM