Subscribe
THE DAILY DIGEST

The daily edition.

Essential reading from Rocket Enterprise. Straight to the source.

Archived edition
DAILY EDITION1 story· 4 min read

EZASOKET TCP/IP API in Rocket Enterprise Server

In IBM z/OS mainframe environments, core transaction applications (CICS) and batch jobs frequently communicate directly across IP networks using IBM's low-level EZASOKET socket interface API (CALL 'EZASOKET' USING SOC-FUNCTION ...). Organizations rely on EZASOKET to interface directly with financial payment gateways, real-time credit bureaus, messaging brokers, and distributed external systems without HTTP or web service abstraction layers.

IN FOCUS

EZASOKET TCP/IP API in Rocket Enterprise Server

In IBM z/OS mainframe environments, core transaction applications (CICS) and batch jobs frequently communicate directly across IP networks using IBM's low-level EZASOKET socket interface API (CALL 'EZASOKET' USING SOC-FUNCTION ...). Organizations rely on EZASOKET to interface directly with financial payment gateways, real-time credit bureaus, messaging brokers, and distributed external systems without HTTP or web service abstraction layers. [1]

Read the full briefing

1. Capability Overview & Problem It Solves

In IBM z/OS mainframe environments, core transaction applications (CICS) and batch jobs frequently communicate directly across IP networks using IBM's low-level EZASOKET socket interface API (CALL 'EZASOKET' USING SOC-FUNCTION ...). Organizations rely on EZASOKET to interface directly with financial payment gateways, real-time credit bureaus, messaging brokers, and distributed external systems without HTTP or web service abstraction layers.

When modernizing or rehosting these applications to distributed Linux, UNIX, or Windows platforms, rewriting low-level COBOL socket logic to use native POSIX Berkeley sockets or C-wrapper libraries introduces substantial risk, code divergence, and regression testing effort.

Rocket Enterprise Server provides native, mainframe-compatible EZASOKET TCP/IP API emulation across both CICS transactions and standalone batch JCL jobs (Prerequisites (EZASOKET) - Rocket Software Documentation, Enabling EZASOKET Support in Enterprise Server). This emulation enables COBOL applications to open, bind, listen, and transfer raw socket streams on distributed systems using identical call syntax, copybooks, and socket structures.

2. Architecture & How It Works

  • Zero Source Code Rewriting: COBOL programs preserve their native IBM mainframe parameter blocks and copybook structures (e.g., EZACICAL, EZACIC06, EZACIC08). Standard socket function calls—including INITAPI, SOCKET, BIND, LISTEN, ACCEPT, CONNECT, READ, WRITE, SELECTEX, CLOSE, and TERMAPI—are intercepted by Rocket runtime modules and mapped directly to underlying host TCP/IP socket handles.
  • CICS Subsystem Management (EZAC & EZACIC20): In online CICS regions, the socket interface runs as a managed subsystem service:
    • Configuration & Monitoring: Administrators use the IBM-compatible EZAC CICS transaction to define, display, alter, start, and stop socket interfaces and listener definitions dynamically (Enabling EZASOKET Support in Enterprise Server).
    • Programmatic Lifecycle Control: Programs can start or terminate the socket interface dynamically by issuing an EXEC CICS LINK PROGRAM('EZACIC20') with a structured COMMAREA (P20TYPE initialized to START or STOP), eliminating manual operator startup steps (Starting and Stopping the EZASOKET Interface with a Program Link).
  • CICS Listener Program (EZACIC02): Enterprise Server replicates the standard mainframe CICS listener daemon (EZACIC02). The listener binds to a specified TCP port, waits for inbound client connections, extracts incoming transaction identifiers and user data from the initial handshake packet, and triggers the target worker transaction via EXEC CICS START, passing the socket descriptor seamlessly to the worker task.
  • Batch Socket Processing: In batch environments, JCL job steps executing COBOL programs call EZASOKET directly. The batch runtime initializes socket resources via INITAPI without requiring an active CICS region or terminal emulation layer.

3. Key Syntax, Configuration & Operational Directives

  1. Enabling EZASOKET in the Server Region: In ESCWA (Enterprise Server Common Web Administration) under [Region] > Properties > Environment Variables or within the startup script, configure (Enabling EZASOKET Support in Enterprise Server):
ES_EZASOKET_SUPPORT=YES
  1. CICS System Initialization Table (SIT) Group: Ensure the supplied EZASOKET resource group containing the standard control transactions (EZAC, EZAO) and interface programs (EZACIC00, EZACIC01, EZACIC02, EZACIC20) is added to the region's startup list in the System Initialization Table (SIT) (Prerequisites (EZASOKET) - Rocket Software Documentation).
  2. Programmatic Interface Startup via EZACIC20:
       WORKING-STORAGE SECTION.
       COPY EZACICA.
       ...
       PROCEDURE DIVISION.
           MOVE 'START' TO P20TYPE
           EXEC CICS LINK PROGRAM('EZACIC20')
                          COMMAREA(EZACICA)
                          LENGTH(LENGTH OF EZACICA)
                          RESP(WS-RESP)
           END-EXEC.
  1. COBOL Socket API Calling Syntax:
       WORKING-STORAGE SECTION.
       01  SOC-FUNCTION       PIC X(16) VALUE 'SOCKET'.
       01  AF-INET            PIC 9(8) COMP VALUE 2.
       01  SOCK-STREAM        PIC 9(8) COMP VALUE 1.
       01  IPPROTO-TCP        PIC 9(8) COMP VALUE 6.
       01  ERRNO              PIC 9(8) COMP.
       01  RETCODE            PIC S9(8) COMP.
       ...
       PROCEDURE DIVISION.
           CALL 'EZASOKET' USING SOC-FUNCTION,
                                 AF-INET,
                                 SOCK-STREAM,
                                 IPPROTO-TCP,
                                 ERRNO,
                                 RETCODE.

4. Reference Citations (Rocket Enterprise Server 12.0 Manuals)

Enterprise Server · 12.0 · Linux/UNIX
Documentation references
That’s the briefing.You’ve reached the end of this edition.
More editions

From the archive

View all
Oct 2

CICS Temporary Storage (TSQ) & Transient Data (TDQ) Queue Management

Oct 1

Copybook Resolution (COBCPY) & Directive Files (cobol.dir)

Sep 30

External File Handler (ExtFH) Directives & Configuration (extfh.cfg)