Three variables are treated specially within Rexx programs -- RC, RESULT, and SIGL. Initially none of these variables has an associated value. You can alter these variables in assignment, parse, arg, and pull instructions. These variables can be exposed in procedure instructions. These variables can also be dropped.
The RC variable retains the completion code of the most recently executed command. This command may have been initiated by the address instruction.
The RC variable is also set to the error code associated with syntax errors.
Note: the RC variable is not altered by commands that are initiated at an interactive trace prompt.
The RESULT variable retains the last value that was returned from a procedure that was called as a subroutine. If the subroutine did not return a result (when an expression value was omitted on the return instruction), then the RESULT variable is unassigned.
The SIGL variable retains the source line number of the last instruction that caused control flow to jump to a label.
The SIGL variable is altered during one of the following circumstances:
Note: the SIGL variable is not altered when a label is encountered during normal control flow from one instruction to the next.