IBM SC34-5764-01 Server User Manual


 
v Zero or more blanks (which are ignored)
v A sequence of tokens (see section “Tokens” on page 111)
v Zero or more blanks (again ignored)
v 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 page 114) are also removed.
Implementation maximum: The length of a clause cannot exceed 16K.
Characters
A character is a member of a defined set of elements that is used for the control or representation of data.
You can usually enter a character with a single keystroke. The coded representation of a character is its
representation in digital form. A character, the letter A, for example, differs from its coded representation or
encoding. Various coded character sets (such as ASCII and EBCDIC) use different encodings for the letter
A (decimal values 65 and 193, respectively). This book uses characters to convey meanings and not to
imply a specific character code, except where otherwise stated. The exceptions are certain built-in
functions that convert between characters and their representations. The functions C2D, C2X, D2C, X2C,
and XRANGE have a dependence on the character set in use.
A code page specifies the encodings for each character in a set. You should be aware that:
v Some code pages do not contain all characters that REXX defines as valid (for example, ¬, the logical
NOT character).
v Some characters that REXX defines as valid have different encodings in different code pages (for
example, !, the exclamation point).
For information about Double-Byte Character Set characters, see Appendix C, “Double-Byte Character Set
(DBCS) Support,” on page 395.
Comments
A comment is a sequence of characters (on one or more lines) delimited by /* and */. Within these
delimiters any characters are allowed. Comments can contain other comments, as long as each begins
and ends with the necessary delimiters. They are called nested comments. Comments can be anywhere
and can be of any length. They have no effect on the program, but they do act as separators. (Two tokens
with only a comment in between are not treated as a single token.)
/* This is an example of a valid REXX comment */
Take special care when commenting out lines of code containing /* or */ as part of a literal string.
Consider the following program segment:
01 parse pull input
02 if substr(input,1,5) = '/*123'
03 then call process
04 dept = substr(input,32,5)
To comment out lines 2 and 3, the following change would be incorrect:
01 parse pull input
02 /* if substr(input,1,5) = '/*123'
03 then call process
04 */ dept = substr(input,32,5)
This is incorrect because the language processor would interpret the /* that is part of the literal string
/*123 as the start of a nested comment. It would not process the rest of the program because it would be
looking for a matching comment end (*/).
REXX General Concepts
110
CICS TS for VSE/ESA: REXX Guide