Special variables
RC, RESULT, and SIGL are special variables.
- 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 Error numbers and 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 change the value of RC.
- 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.)
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 PARSE). 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 the PDS or DDNAME/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 PARSE) 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.
You can obtain the current settings of the NUMERIC function by using the DIGITS, FORM, and FUZZ built-in functions.