Structure and General Syntax
REXX programs are recommended to start with a comment. REXX/CICS does
not require this. However, for portability reasons, you are recommended
to start each REXX program with a comment that begins on the first
line and includes the word REXX. The example in Figure 1 illustrates
this. The program starts with a comment and the characters "REXX" are in the first line (line 1).
Figure 1. Example
of Using the REXX Program Identifier
/* REXX program */
...
...
...
EXIT
A REXX program is built from a series of clauses that are composed of:
- Zero or more blanks (which are ignored)
- A sequence of tokens (see section Tokens)
- Zero or more blanks (again ignored)
- A semicolon (;) delimiter that may be implied by line-end, certain keywords, or the colon (:).
Conceptually, each clause is scanned from left to right before processing, and the tokens composing it are identified. Instruction keywords are recognized at this stage, comments are removed, and multiple blanks (except within literal strings) are converted to single blanks. Blanks adjacent to operator characters and special characters (see section Tokens) are also removed.
Implementation maximum: The length of a clause cannot exceed 16K.