Module 8: CICS Program and Data Passing
Program Control
What program control means in CICS
- Program control is how CICS programs invoke other programs and return control.
- The main program control commands are LINK, XCTL and RETURN.
- LOAD and RELEASE manage programs in storage. DELETE PROGRAM removes a program definition.
- Every program invoked by LINK or XCTL must be defined to CICS.
- Program control is cheaper than a COBOL CALL when you need CICS services, because CICS manages the invocation.
Logical levels in program control are shown below:-

Logical levels
- Each LINK creates a new logical level below the current program.
- XCTL keeps control at the same logical level. It replaces the current program.
- A plain RETURN moves control up one logical level.
- RETURN TRANSID ends the task but schedules the next execution of a pseudo-conversational program.
- Deep LINK nesting uses more storage. Prefer XCTL chains when control never needs to come back.
LOAD and RELEASE
- LOAD brings a program into storage so you can access its address.
- RELEASE drops a program that was loaded with LOAD.
- Most programs do not need LOAD. CICS loads programs automatically on LINK and XCTL.
- Example:-EXEC CICS LOAD PROGRAM('CUSTPGM') END-EXEC. . . * use the program . EXEC CICS RELEASE PROGRAM('CUSTPGM') END-EXEC.
