Executing Static SQL and Compiled REXX Applications
Describes how to run static SQL in compiled REXX applications.
To run this fully compiled version of our EXAMPLE application (both REXX EXEC and embedded SQL exist as load modules), we invoke
RLX
with the following command stringRLXS EXAMPLER RLXPLAN(EXAMPLEP) RLXPGM(EXAMPLES)
where EXAMPLE
R
identifies the compiled REXX load module, the RLX
PLAN keyword identifies the static Db2 application plan named EXAMPLEP
and the RLX
PGM keyword identifies the load module named EXAMPLES
which contains the compiled RLX
SQL statements. In both cases, we assigned unique names to the application plan, the translated REXX EXEC and the two load modules, all of which are different from the name of the original REXX EXEC. This was done for the sake of clarity.
It is not necessary to make all these names unique and different from the name of the original source EXEC. It is necessary, however, to ensure that the names of the compiled REXX load module and compiled SQL load module are different.
One convention you might adopt is to use the same name for the compiled EXEC and Db2 application plan as was used for the original source EXEC. Then choose another name for the compiled SQL load module. To illustrate, reformulate our previous illustration to invoke
RLX
with the command stringRLXS EXAMPLE RLXPLAN(EXAMPLE) RLXPGM(EXAMPLES)
This second illustration assumes we assigned the name EXAMPLE to both the compiled REXX load module (or the translated REXX EXEC) and the Db2 application plan that resulted from
RLX
/Compile processing of the original REXX EXEC named EXAMPLE. In contrast, we assign the name EXAMPLES
to the load module comprised of the RLX
SQL statements that were extracted from the EXAMPLE EXEC and subsequently preprocessed, compiled and link edited. The name EXAMPLES
distinguishes the SQL load module from the compiled REXX load module which is already
named EXAMPLE.As an alternative to coding the
RLX
PLAN and RLX
PGM keywords, you can instead specify default values for the RLX
plan and SQL load module names through the RLX
profile facilities with which individual, shared and/or RLX
system profiles are managed. (This is the same as with dynamic RLX
.) See the description of the RLX
User Profile described in the RLX
/SQL Reference, as well as the descriptions of the RLX
Shared and Installation Profiles appearing in the RLX
Installation Guide.