Special Variable RC

The REXX special variable RC normally contains the return code from host command most recently executed. The special value -3 indicates that the specified command was not found.

If a system abend occurs, the value returned is the negative of the decimal value of the abend code. For example, an S0C1 abend would result in RC = -193. For a user abend, RC is set to the decimal value of the abend code.

If no abend occurs, then RC is set to the decimal value of the return code returned by the command. For REXX services provided by IBM or other software vendors, refer to the product documentation for more information on how to interpret these return codes.

Unix System Services

For the SYSCALL environment (callable services): Additional information may be found in the following special variables: ERRTEXT on the Unix System Services and REXX page can be used to look up additional information on the ERRNO and ERRNOJR codes.

For More Information

Visit the REXX page here for more sources of REXX info.
Big Iron