RCSRCP - Create a
RLX
SQL Requestor Load Module

This article describes the RCSRCP procedure that produces the static SQL load module that is associated with your application.
The RCSRCP procedure produces the static SQL load module that is associated with your application. This procedure lets you build complex applications that are composed of multiple SQL object modules and their corresponding DBRMs. The procedure consists of the following five steps:
(1)
The PARMGEN step creates a table of all the SQLREQ modules (produced by one or more executions of the RCSPC procedure) to be combined into a single static SQL load module.
(3)
The step that is named LMDDTS produces a date-and-time stamp that the linkage editor includes in the static SQL load module.
(4)
The step that is named RCSGRCP generates the control cards that direct the linkage editor.
(5)
The LKEDIT step produces the static SQL load module that is a composite of all the discrete object modules that are identified in the RCSPARMS input stream. An example of RCSPARMS input appears in the following code sample that illustrates invocation of the procedure.
//*--------------------------------------------------------------------- //* (C) COPYRIGHT Broadcom 2022. //* LICENSED MATERIAL - PROGRAM PROPERTY RELATIONAL ARCHITECTS INTL //*--------------------------------------------------------------------- //* RLX/COMPILE - CREATE COMPOSITE SQL REQUESTOR LOAD MODULE //*--------------------------------------------------------------------- //RCSRCP PROC RLXLOAD='RAI.Rvrm.CRAILOAD, ** RLX SYSTEM LOADLIB // RLXNCAL='RAI.Rvrm.CRAILOAD, ** RLX SYSTEM NCAL LIB // RLXMACS='RAI.Rvrm.CRAIMACS, ** RLX MACRO LIBRARIES // RCSLOAD='RAI.Rvrm.CRAILOAD, ** RLX LOAD LIBRARIES // RCSOBJ='USER.RCSOBJ', ** USER SQL REQUESTOR OBJ // SQLREQ=SQLREQ ** COMBINED SQL REQ LMOD //*--------------------------------------------------------------------- //* CREATE SQL REQUESTOR ASSEMBLY LANGUAGE HEADER //*--------------------------------------------------------------------- //PARMGEN EXEC PGM=RCSGRCP,REGION=2M,COND=(4,LT) //STEPLIB DD DSN=&RLXLOAD,DISP=SHR //RCSRCP DD DSN=&RCSRCP,UNIT=SYSDA,SPACE=(CYL,(1,1)), // DISP=(NEW,PASS),DCB=BLKSIZE=80 //SYSTSPRT DD SYSOUT=* //*--------------------------------------------------------------------- //* ASSEMBLE THE SQL REQUESTOR HEADER //*--------------------------------------------------------------------- //RCS$RCP EXEC PGM=IEV90,COND=(4,LT),PARM=(DECK,NOOBJ,TERM,BATCH,RENT, // 'SYSPARM=1111110110011'),REGION=2M,COND=(4,LT) //SYSIN DD DSN=&RCSRCP,DISP=(OLD,PASS) //SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR // DD DSN=&RLXMACS,DISP=SHR //SYSUT1 DD DSN=&SYSUT1,UNIT=SYSDA,SPACE=(1700,(600,100)) //SYSUT2 DD DSN=&SYSUT2,UNIT=SYSDA,SPACE=(1700,(300,50)) //SYSUT3 DD DSN=&SYSUT3,UNIT=SYSDA,SPACE=(1700,(300,50)) //SYSTERM DD SYSOUT=*,DCB=BLKSIZE=1089 //SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=1089 //SYSPUNCH DD DSN=&RCSRCPO,UNIT=SYSDA,SPACE=(CYL,(10,1)), // DISP=(NEW,PASS) //*--------------------------------------------------------------------- //* PRODUCE DATE AND TIME STAMP TO BE STORED //* IN THE LOAD MODULE'S PDS DIRECTORY ENTRY //*--------------------------------------------------------------------- //LMDDTS EXEC PGM=LMDDTS,REGION=128K,COND=(4,LT) //STEPLIB DD DSN=&RLXLOAD,DISP=SHR //SYSLIN DD DSN=&LMDDTS,UNIT=SYSDA,SPACE=(10,(200,50)), // DISP=(NEW,PASS) //*--------------------------------------------------------------------- //* CREATE INPUT FOR THE LINKAGE EDITOR //*--------------------------------------------------------------------- //RCSGRCP EXEC PGM=RCSGLKIN,PARM=&SQLREQ,REGION=2M,COND=(4,LT) //STEPLIB DD DSN=&RLXLOAD,DISP=SHR //SYSOUT DD DSN=&LKEDIN,UNIT=SYSDA,SPACE=(TRK,(1,1)), // DISP=(NEW,PASS),DCB=BLKSIZE=80 //SYSTSPRT DD SYSOUT=* //*--------------------------------------------------------------------- //* FULL LINK EDIT TO PRODUCE COMBINED SQL REQUESTOR LOAD MODULE //*--------------------------------------------------------------------- //LKEDIT EXEC PGM=IEWL,REGION=2M,COND=(4,LT), // PARM='LIST,XREF, ,RENT,REFR,SIZE=(512000,256000)' //SYSLIB DD DSN=&RCSOBJ,DISP=SHR /* USER OBJECT LIB //RLXSYS DD DSN=&RLXNCAL,DISP=SHR /* RLX LOAD //SYSLMOD DD DSN=&RCSLOAD,DISP=SHR /* SQL REQ LMOD //SYSUT1 DD DSN=&SYSUT1,UNIT=SYSDA,SPACE=(1024,(50,20)) //SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=121,BLKSIZE=1210) //SYSLIN DD DSN=&RCSRCPO,DISP=(OLD,DELETE) /* RCS$RCP HEADER // DD DSN=&LMDDTS,DISP=(OLD,PASS) /* DATE AND TIME STAMP // DD DSN=&LKEDIN,DISP=(OLD,DELETE)
The next example illustrates how to invoke the RCSRCP catalogued procedure to produce the composite static SQL load module that is associated with your compiled
RLX
application. The numbers in the right margin correspond to the numbered paragraphs:
(1)
RCSRCP is invoked as a catalogued procedure. RCSRCP can also be included instream with the JCL.
(2)
The SQLREQ parameter names the static SQL requestor module that is produced by the linkage editor. This name must be different from the compiled REXX load module.
(3)
RCSPARMS specifies the list of SQL Requestor object modules (one or more) that should be link-edited together to produce the composite load module identified by the SQLREQ parameter in (2). Each object module in the list should be separated by a comma.
If the compiled application issues dynamic SQL at run time, you should specify
RLX
SQL or
RLX
SQL (the dynamic SQL modules that are supplied with
RLX
) as the first name in the list. Specify
RLX
SQL for releases of Db2 before V6.1 and
RLX
SQL for plans to be bound on Db2 subsystems at Version 6.1 or later. If your compiled application issues only static SQL requests, then start the list with a comma to denote the omission of the
RLX
SQL or
RLX
SQL module -- as in the following example:
//RCSPARMS DD * ,EXAMPLE1,EXAMPLE2
//JOB1 JOB (PARMS) //STEP2 EXEC RCSRCP,
(1)
// SQLREQ=EXAMPLES
(2)
//RCSPARMS DD *
(3)
RLXSQL,EXAMPLE1,EXAMPLE2