Kilowatt Software L.L.C.
Classic Rexx Tutorial
Language Level 4.00 (TRL-2)

Special variables

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.

RC variable

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.

RESULT variable

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.

SIGL variable

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.

Kilowatt Software L.L.C. -- Classic Rexx Tutorial -- Back to top
Click here if you have any comments or questions regarding this tutorial

Last updated on: 11 Apr 2006