For PL/I

You can set and alter the user return code with the PLIRETC function or the OPTIONS(RETCODE) attribute. The PLIRETV function retrieves the current value of the user return code.

When a PL/I routine initiates enclave termination, such as with a STOP or EXIT statement in a subroutine or with a RETURN or END statement in a main procedure, the user return code is the value set with the PLIRETC function or the OPTIONS(RETCODE) attribute. However, CEE3SRC can alter the user return code set with PLIRETC or the OPTIONS(RETCODE) attribute. If CEE3SRC was the last method used to set the user return code, the last three bytes of the return-code set by CEE3SRC are used as the user return code.

If the enclave terminates due to an unhandled condition with severity 2 or greater, the user return code value set last (with either PL/I constructs or CEE3SRC) is used in the calculation of the enclave return code; if one has not been set, the user return code value is 0. See Termination behavior for unhandled conditions for information about unhandled conditions.

CEE3SRC and CEE3GRC are not supported in PL/I multitasking applications.

See IBM Enterprise PL/I for z/OS library for details about the PL/I language constructs.