Module 8: CICS Program and Data Passing
LINK
What the LINK command does
- LINK transfers control from one program to another program.
- The called program runs at the next lower logical level.
- When the called program issues RETURN, control comes back to the program that issued the LINK.
- It works like a subroutine call. The caller waits while the called program runs.
- Data is passed with the COMMAREA or CHANNEL option.
- The program name must be defined to CICS unless it is already loaded.
Syntax of the LINK command
How the linked program returns
- The linked program ends with a plain EXEC CICS RETURN END-EXEC.
- This RETURN sends control back to the program that issued the LINK.
- Do not use RETURN TRANSID here. That would start a new task instead of returning.
- Check EIBRESP after the LINK to see if the called program was found and ran normally.
MainframeBug Assistant