Product SiteDocumentation Site

1.10. Structure and General Syntax

A Rexx program is built from a series of clauses that are composed of:
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 sequences of whitespace characters (except within literal strings) are converted to single blanks. Whitespace characters adjacent to operator characters and special characters are also removed.

1.10.1. 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 depend on the character set used.
A code page specifies the encodings for each character in a set. Be aware that:
  • Some code pages do not contain all characters that Rexx defines as valid (for example, the logical NOT character).
  • Some characters that Rexx defines as valid have different encodings in different code pages, for example the exclamation mark (!).