The RETURN macro restores the control to the calling program and signals normal termination of the called program. The return of control is always made by executing a branch instruction using the address in register 14. Because the RETURN macro uses a BR 14 to pass control, it can be used only when the return is to a program that executes in the same addressing mode. The RETURN macro can restore a designated range of registers, provide a return code in register 15, and flag the save area used by the called program.
If registers are to be restored, or if an indicator is to be placed into the save area, register 13 must contain the address of the save area, which must have the standard format.
The RETURN macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede RETURN. |
RETURN | |
␢ | One or more blanks must follow RETURN. |
(reg1) |
reg1 and reg2: Decimal digits, and in the order 14, 15, 0 through 12. |
,T | |
,RC=ret code | ret code: Decimal digit, symbol, or register (15). The maximum value is 4095. |
The parameters are explained as follows:
RETURN (14,12),T,RC=0