IBM SC34-5764-01 Server User Manual


 
Appendix D. Reserved Keywords and Special Variables
You can use keywords as ordinary symbols in many situations where there is no ambiguity. The precise
rules are given here.
There are three special variables: RC, RESULT, and SIGL.
Reserved Keywords
The free syntax of REXX implies that some symbols are reserved for the language processor's use in
certain contexts.
Within particular instructions, some symbols may be reserved to separate the parts of the instruction.
These symbols are referred to as keywords. Examples of REXX keywords are the WHILE in a DO
instruction and the THEN (which acts as a clause terminator in this case) following an IF or WHEN clause.
Apart from these cases, only simple symbols that are the first token in a clause and that are not followed
by an = or : are checked to see if they are instruction keywords. You can use the symbols freely
elsewhere in clauses without their being taken as keywords.
It is not, however, recommended for users to run host commands or commands with the same name as
REXX keywords (QUEUE, for example). This can create problems for any programmer whose REXX
programs might be used for some time and in circumstances outside his or her control, and who wishes to
make the program absolutely watertight.
In this case, a REXX program may be written with (at least) the first words in command lines enclosed in
quotation marks.
Example:
'SCRNINFO'
This also has the advantage of being more efficient, and, with this style, you can use the SIGNAL ON
NOVALUE condition to check the integrity of an exec.
An alternative strategy is to precede such command strings with two adjacent quotation marks, which
concatenates the null string on to the front.
Example:
''SCRNINFO
A third option is to enclose the entire expression (or the first symbol) in parentheses.
Example:
(SCRNINFO)
More important, the choice of strategy (if it is to be done at all) is a personal one by the programmer. The
REXX language does not impose it.
Special Variables
There are three special variables that the language processor can set automatically:
© Copyright IBM Corp. 1992, 2009 409