Rexx is a procedural programming language that allows programs and
algorithms to be written in a clear and structured way, and it is designed
to be easy to use as well as flexible. It keeps the use of special
characters to a minimum to promote readability, and does not prevent
the use of keywords as variables or program labels. It uses a single
datatype, namely the string of characters. Rexx has been standardised by
the American National Standards Institute, although the majority of
interpreters are not yet fully compliant. Most interpreters do however
follow the reference work The Rexx Language by M. F. Cowlishaw, second
The interpreter documented by this manual page is from the REXX/imc
package. The syntax of the Rexx language is described in other documents
from that package. This manual page contains a summary of how to invoke
the Rexx interpreter.
In the first form of invocation,
rexx is supplied with the name of a program to execute. (Systems supporting
the #! notation invoke interpreters this way.) If the
filename parameter is omitted or is a single hyphen then the program will be
read from the standard input; otherwise the program will be read from
the given file. The interpreter will search for the program along
the path given by the environment variable REXXPATH or (if that is
not set) PATH. If
filename does not contain a dot and the file
filename.rexx can be found then it is read and executed; otherwise
filename is treated as the literal name of the file to be executed.
In the second form of invocation the program is supplied as a single list
of instructions following the
-s or -c flags (which are equivalent). Note that this list will usually need to
be supplied in quotes to stop the shell from tokenising it. The instructions
will be treated just as if they had been read in from a program file.
-i flag supplies a minimal program to the interpreter which makes it enter
interactive trace mode, in which instructions may be typed in and will
be executed immediately. This should be ended by typing
rexx -v with no further arguments causes the interpreter to print its version
information and exit.
Any text remaining after the flags and program name have been processed
is collected up and passed to the Rexx program as a parameter string.
This parameter string should not begin with a hyphen, or it will be
mistaken for a flag; the exception is when the
filename parameter is present: this terminates flag processing and all further
text is taken to be the programs argument string.