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.


Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/structu.html