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—includingINITAPI,SOCKET,BIND,LISTEN,ACCEPT,CONNECT,READ,WRITE,SELECTEX,CLOSE, andTERMAPI—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
EZACCICS 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 (P20TYPEinitialized toSTARTorSTOP), eliminating manual operator startup steps (Starting and Stopping the EZASOKET Interface with a Program Link).
- Configuration & Monitoring: Administrators use the IBM-compatible
- 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 viaEXEC CICS START, passing the socket descriptor seamlessly to the worker task. - Batch Socket Processing: In batch environments, JCL job steps executing COBOL programs call
EZASOKETdirectly. The batch runtime initializes socket resources viaINITAPIwithout requiring an active CICS region or terminal emulation layer.
3. Key Syntax, Configuration & Operational Directives
- Enabling EZASOKET in the Server Region: In ESCWA (Enterprise Server Common Web Administration) under
[Region] > Properties > Environment Variablesor within the startup script, configure (Enabling EZASOKET Support in Enterprise Server):
ES_EZASOKET_SUPPORT=YES- 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). - 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.- 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)
- Prerequisites (EZASOKET) - Rocket Software Documentation — Enterprise Server 12.0 for UNIX
- Enabling EZASOKET Support in Enterprise Server — Enterprise Server 12.0 for UNIX
- Starting and Stopping the EZASOKET Interface with a Program Link — Enterprise Server 12.0 for UNIX