RLX
/Precompiler Operation

Describes how the
RLX
/Preocmpiler works.
The
RLX
/Precompiler operates as follows:
(1)
Reads and syntax checks the source exec. If any errors are detected, the precompiler flags them with an appropriate message and returns a non-zero completion code.
(2)
Identifies and extracts any embedded
RLX
commands. Due to the dynamic nature of the REXX language, only partial identification of
RLX
statements is possible. The precompiler identifies statements of the following forms as
RLX
statements and selects them for processing:
'RLX command ...' "RLX command ...' "RLX" command ... 'RLX' command ... RLX command
When prefixed by ADDRESS TSO or ADDRESS
RLX
, statement strings are recognized as
RLX
statements. For example,
ADDRESS TSO 'RLX command' ADDRESS RLX 'RLX command'
The
RLX
/Precompiler recognizes, but neither extracts nor processes host commands which request the
RLX
CONTROL and
RLX
TERM services. These two exceptions are deliberate.
The
RLX
/Precompiler selects and extracts all REXX assignment statements in which variable names of the form
RLX
SQLxx appear on the left-hand side of the assignment. For example,
RLXSQL1 = 'literal string 1' RLXSQL2 = 'literal string 2'
In addition, you can instruct the precompiler to extract REXX assignment statements of your own choosing. For example,
RLXVARS = (some_var, another_var, ...).
The
RLX
VARS operand in this example instructs the
RLX
precompiler to recognize variable names of the form SOME_VARxxx and ANOTHER_VARxxx as containing literal strings to be used to resolve
RLX
commands. When variables with these names appear on the left-hand side of an assignment statement, the precompiler extracts such statements and passes them to the
RLX
/Compiler. For example,
some_var1 = 'literal string 1' some_var2 = 'literal string 2' another_var1 = 'literal string 3' another_var2 = 'literal string 4'
The
RLX
VARS operand instructs the precompiler to check for variables whose names start with some_var and another_var in addition to
RLX
SQL1,
RLX
SQL2, ...
RLX
SQLn. This list of
RLX
VAR variables may be specified in the body of the EXEC or through the optional RCSAUX file. If you code the
RLX
VAR operand in line within your EXEC, be sure to place it physically before any assignment statements in which these variables are referenced.
The
RLX
SQL variables and any auxiliary variables you specify are typically used when the
RLX
host command string exceeds 500 characters in length (the maximum length of REXX literal strings in releases of TSO/E REXX before TSO/E V2.4). For example, the two
RLX
SQL variables that are coded might appear in a
RLX
command like the following:
"RLX" RLXSQL1 RLXSQL2
(3)
The precompiler translates the
RLX
statements that it selects by inserting a special statement prefix of the form
'$ exec_name RLX_statement_number'
between the
RLX
literal and the rest of the
RLX
statement string. This enables
RLX
to recognize the statement string as a static SQL request.
Suppose, for example, the following
RLX
statement was coded as the third
RLX
SQL request in a REXX EXEC named EXAMPLE.
'RLX OPEN C1'
The
RLX
/Precompiler would translate this
RLX
host command as follows:
'RLX' '$ EXAMPLE 3' 'OPEN C1'