Auxiliary Input to the RLX/Precompiler
RLX
/PrecompilerThe optional RCSAUX file may be used to provide auxiliary input to the
RLX
/Precompiler. Typically, this will include statements that assign values to REXX variables that appear in RLX
statement strings so the statements can be resolved as static SQL requests at compile time. For example, you can provide an Authid and/or a Db2 table name as auxiliary input as illustrated in the following example:"RLX SELECT NAME, OWNER FROM" Db2_table_name
By itself, the above statement is neither compilable nor executable since the Db2 table name is undefined. However, you can provide auxiliary input to the
RLX
/Precompiler through the RCSAUX file as illustrated below://RCSAUX DD * Db2_table_name = 'SYSIBM.SYSDATABASE' /*
The REXX statement supplied in the RCSAUX input stream assigns the value SYSIBM.SYSDATABASE to the REXX variable named
Db2_table_name
. The Precompiler will write this assignment statement to the RCSEXTR output file, ahead of the extracted RLX
SELECT statement. At compile time, the value of Db2_table_name
will be properly resolved so the RLX
/Compiler can successfully produce static SQL for the statement.Please note that the static SQL load module and application plan thus produced may reference the table named SYSIBM.SYSDATABASE. If the name Db2 table is to be resolved at run-time, only dynamic SQL can be used.
only
In order to run as a static SQL application, you will need to create a Db2 plan, SQL load module and compiled REXX load module for each value that
unique
discrete
Db2_table_name
will assume at run-time. For example, to use the EXAMPLE exec described above to access a shadow Db2 catalog table named DBA.SYSDATABASE via static SQL, you would have to recompile the EXEC to produce a separate Db2 application plan and SQL load module, this time specifying the auxiliary input through the RCSAUX file, as illustrated below.//RCSAUX DD * Db2_table_name = 'SYSIBM.SYSDATABASE' /*