Reserved keywords

The free syntax of REXX implies that some symbols are reserved for the language processor's use in certain contexts. In specific instructions, some symbols might 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 programmers whose REXX programs might be used for some time and in circumstances outside their control, and who want to make the program absolutely watertight.

In this case, a REXX program can be written with (at least) the first words in command lines enclosed in quotation marks, for 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, for example:
''SCRNINFO
A third option is to enclose the entire expression (or the first symbol) in parentheses, for example:
(SCRNINFO)

The choice of any strategy is a personal one by the programmer. The REXX language does not impose it.