Special Variables

There are three special variables that the language processor can set automatically:

RC
is set to the return code from any run host command (or subcommand). Following the SIGNAL events, SYNTAX, ERROR, and FAILURE, RC is set to the code appropriate to the event: the syntax error number (see appendix on error messages) or the command return code. RC is unchanged following a NOVALUE or HALT event.
Note:
Host commands run manually from debug mode do not cause the value of RC to change.
RESULT
is set by a RETURN instruction in a subroutine that has been called if the RETURN instruction specifies an expression. If the RETURN instruction has no expression on it, RESULT is dropped (becomes uninitialized.)
SIGL
contains the line number of the clause currently executing when the last transfer of control to a label took place. (A SIGNAL, a CALL, an internal function invocation, or a trapped error condition could cause this.)

None of these variables has an initial value. You can alter them, just as with any other variable, and the PROCEDURE and DROP instructions affect these variables in the usual way.

Certain other information is always available to a REXX program. This includes the name that the program was called and the source of the program (which is available using the PARSE SOURCE instruction--see page ***). PARSE SOURCE output consists of the string CICS followed by the call type, the name of the exec in uppercase, the name of the file, and library member being run. These are followed by the name by which the program was called and the initial (default) command environment.

In addition, PARSE VERSION (see page ***) makes available the version and date of the language processor code that is running. The built-in functions TRACE and ADDRESS return the current trace setting and environment name, respectively.

Finally, you can obtain the current settings of the NUMERIC function by using the DIGITS, FORM, and FUZZ built-in functions.