Illustrative
RLX
/Compile Program Preparation Jobstream

Provides an example of a
RLX
/Compile job that prepares the REXX exec that is named EXAMPLE that runs as a compiled REXX procedure with an associated static SQL application plan.
The following sample provides an example of a
RLX
/Compile job that prepares the REXX exec that is named EXAMPLE that runs as a compiled REXX procedure with an associated static SQL application plan. This jobstream produces the following three entities that together run in place of the REXX SQL exec named EXAMPLE.
(1)
A compiled REXX load module named EXAMPLE. This load module is executed in lieu of the EXAMPLE exec residing in an EXEC library.
(2)
A static Db2 application plan that is named EXAMPLE is bound.
(3)
A SQL requestor load module named EXAMPLE
S
. The name of the SQL load module EXAMPLE
S
must be different from the compiled REXX load module name because they are two discrete entities that are loaded and active at the same time.
The numbers in the right margin correspond to the numbered paragraphs that follow:
//RLXCOMP JOB (...) //*-------------------------------------------------------------------- //* RLX/COMPILE THE RCSDEMO EXEC //*-------------------------------------------------------------------- //STEP1 EXEC RCSPC,
(1)
// SQLEXEC=EXAMPLE,
(2)
// SQLREQ=EXAMPLE
(3)
//RCSP.RCSPARMS DD *
(4)
NAME(EXAMPLE) //*-------------------------------------------------------------------- //* ACCELEREXX COMPILE PRECOMPILED EXEC RCSDEM1 //*-------------------------------------------------------------------- //STEP2 EXEC RCXC,
(5)
// EXEC=EXAMPLE
(6)
//RCXPARMS DD *
(7)
CSECT(EXAMPLE) //*-------------------------------------------------------------------- //* LINK EDIT THE COMPILED REXX LOAD MODULE RCSDEMO //*-------------------------------------------------------------------- //STEP3 EXEC RCXLKED,
(8)
// CSECT=EXAMPLE, // LMOD=EXAMPLE //*-------------------------------------------------------------------- //* CREATE THE SQL REQUESTOR LOAD MODULE //*-------------------------------------------------------------------- //STEP4 EXEC RCSRCP,
(9)
// SQLLREQ=EXAMPLES,
(10)
//RCSPARMS DD *
(11)
RLXSQL,EXAMPLE //*-------------------------------------------------------------------- //* BIND THE STATIC Db2 APPLICATION PLAN //*-------------------------------------------------------------------- //STEP5 EXEC RCSBIND
(12)
//RCSPARMS DD *
(13)
RAI2,EXAMPLE,DSX,61,EXAMPLE
(1)
RCSPC is invoked as a catalogued procedure. RCSPC can also be included instream with the JCL.
(2)
The SQLEXEC parameter identifies the name of the REXX procedure within the EXEC library that is identified by the RCSIN parameter. The Db2 DBRM produced by RCSPC is assigned the name that you specify for the SQLEXEC parameter.
(3)
The SQLREQ parameter identifies the name of the SQL requestor object module that is produced by the RCSPC procedure. It specifies the same name as the compiled REXX module identified by the SQLEXEC parameter.
It is only necessary that the SQL requestor load module and compiled REXX load module names be different since these two modules are active at the same time. The compiled SQL and compiled REXX object modules that comprise them may have the same names -- provided they are compiled into separate object libraries.
(4)
File input to the catalogued procedure step name RCSP is supplied via the DD statement labeled RCSP.RCSPARMS. The NAME
parameter (passed instream) is required -- it identifies the name of the REXX source exec to be precompiled.
(5)
The AcceleREXX compiler is invoked through the catalogued procedure named RCXC.
(6)
The procedure NAME parameter identifies the name of the REXX source exec to be compiled.
(7)
The CSECT keyword parameter of the RCXPARMS DD statement specifies the name of the compiled REXX object module to be produced by AcceleREXX.
(8)
The catalogued procedure RCXLKED is involved in step 3 to create the compiled and executable REXX load module.
(9)
The catalogued procedure RCSRCP is invoked in step 4 to create the SQL requestor load module.
(10)
The SQLREQ parameter specifies the name of the static SQL requestor module to be produced by the linkage editor. This name (EXAMPLE
S
) is different from the name EXAMPLE that is assigned to the compiled REXX load module.
(11)
The RCSPARMS DD statement lists the SQL object modules to be link that is edited together to produce the SQL requestor load module. Since the compiled application may also issue dynamic SQL requests at execution time, the
RLX
SQL object module is specified first, followed by the static SQL object module named EXAMPLE.
(12)
The catalogued procedure RCSBIND is invoked as the fifth and last step to BIND the static Db2 application plan.
(13)
Bind input parameters are supplied through the RCSPARMS DD statement.