Module 8: CICS Program and Data Passing
RETURN
What the RETURN command does
- RETURN ends the current program's execution and gives control back to CICS or to a calling program.
- Every CICS program must end with a RETURN command.
- A plain RETURN with no options simply ends the program.
- RETURN with TRANSID and COMMAREA sets up the next execution of a pseudo-conversational program.
- RETURN with the CHANNEL option passes a channel to the next program execution.
The three uses of RETURN
Syntax of the RETURN command
- EXEC CICS RETURN [TRANSID(trans-id)] [COMMAREA(data-name)] [CHANNEL(channel-name)] END-EXEC.
- TRANSID must be a 1 to 4 character transaction id defined in the PCT.
- COMMAREA names the data area passed to the next execution of the program.
- Use either COMMAREA or CHANNEL, not both.
MainframeBug Assistant