Sample startup procedure for a WLM address space for DSNTPSMP

You must run DSNTPSMP in a WLM-established stored procedures address space. You should run only DSNTPSMP in that address space, and you must limit the address space to run only one task concurrently.

This example shows how to set up a WLM address space for DSNTPSMP.

Recommendation: Use the core WLM environment DSNWLM_REXX. Job DSNTIJMV creates an address space procedure called DSNWLMR for this environment.

The following example shows sample JCL for a startup procedure for the address space in which DSNTPSMP runs.

//DSNWLMR  PROC DB2SSN=DSN,NUMTCB=1,APPLENV=DSNWLM_REXX            1 
//*
//WLMTPSMP EXEC PGM=DSNX9WLM,TIME=1440,                         2 
//              PARM='&DB2SSN,&NUMTCB,&APPLENV',
//              REGION=0M,DYNAMNBR=10                           
//STEPLIB  DD  DISP=SHR,DSN=DSN1010.SDSNEXIT                     3 
//         DD  DISP=SHR,DSN=DSN1010.SDSNLOAD
//         DD  DISP=SHR,DSN=CBC.SCCNCMP 
//         DD  DISP=SHR,DSN=CEE.SCEERUN   
//         DD  DISP=SHR,DSN=DSN1010.DBRMLIB.DATA                 3 
//SYSEXEC  DD  DISP=SHR,DSN=DSN1010.SDSNCLST                     4 
//SYSTSPRT DD  SYSOUT=A
//CEEDUMP  DD  SYSOUT=A
//SYSABEND DD  DUMMY
//*
//SQLDBRM  DD  DISP=SHR,DSN=DSN1010.DBRMLIB.DATA                 5 
//SQLCSRC  DD  DISP=SHR,DSN=DSN1010.SRCLIB.DATA                  6 
//SQLLMOD  DD  DISP=SHR,DSN=DSN1010.RUNLIB.LOAD                  7 
//SQLLIBC  DD  DISP=SHR,DSN=CEE.SCEEH.H                         8 
//         DD  DISP=SHR,DSN=CEE.SCEEH.SYS.H
//SQLLIBL  DD  DISP=SHR,DSN=CEE.SCEELKED                        9 
//         DD  DISP=SHR,DSN=DSN1010.SDSNLOAD 
//SYSMSGS  DD  DISP=SHR,DSN=CEE.SCEEMSGP(EDCPMSGE)              10 
//*
//* DSNTPSMP Configuration File - CFGTPSMP (optional)           11 
//*          A site-provided sequential data set or member, used to
//*         define customized operation of DSNTPSMP in this APPLENV
//*
//* CFGTPSMP DD  DISP=SHR,DSN=
//*
//SQLSRC   DD  UNIT=SYSALLDA,SPACE=(23440,(20,20)),              12 
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440) 
//SQLPRINT DD  UNIT=SYSALLDA,SPACE=(23476,(20,20)),  
//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=23476)
//SQLTERM  DD  UNIT=SYSALLDA,SPACE=(23476,(20,20)),  
//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=23476)
//SQLOUT   DD  UNIT=SYSALLDA,SPACE=(23476,(20,20)),  
//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=23476)
//SQLCPRT  DD  UNIT=SYSALLDA,SPACE=(23476,(20,20)),  
//             DCB=(RECFM=VB,LRECL=137,BLKSIZE=23476)
//SQLUT1   DD  UNIT=SYSALLDA,SPACE=(23440,(20,20)),  
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440) 
//SQLUT2   DD  UNIT=SYSALLDA,SPACE=(23440,(20,20)),  
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440) 
//SQLCIN   DD  UNIT=SYSALLDA,SPACE=(32000,(20,20))   
//SQLLIN   DD  UNIT=SYSALLDA,SPACE=(3200,(30,30)),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)
//SYSMOD   DD  UNIT=SYSALLDA,SPACE=(23440,(20,20)), 
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=23440)
//SQLDUMMY DD  DUMMY
Notes:
 1 
APPLENV specifies the application environment in which DSNTPSMP runs. To ensure that DSNTPSMP always uses the correct data sets and parameters for preparing each external SQL procedure, you can set up different application environments for preparing stored procedures with different program preparation requirements. For example, if all payroll applications use the same set of data sets during program preparation, you could set up an application environment called PAYROLL for preparing only payroll applications. The startup procedure for PAYROLL would point to the data sets that are used for payroll applications.

DB2SSN specifies the Db2 subsystem name.

NUMTCB specifies the number of programs that can run concurrently in the address space. You should always set NUMTCB to 1 to ensure that executions of DSNTPSMP occur serially.

 2 
WLMTPSMP specifies the address space in which DSNTPSMP runs.

DYNAMNBR reserves space for dynamic allocation of data sets during the SQL procedure preparation process.

 3 
STEPLIB specifies the Db2 load libraries, the z/OS® C/C++ compiler library, and the Language Environment® run time library that DSNTPSMP uses when it runs. At least one library must not be APF authorized.
 4 
SYSEXEC specifies the library that contains the REXX exec DSNTPSMP.
 5 
SQLDBRM is an output data set that specifies the library into which DSNTPSMP puts the DBRM that it generates when it precompiles your external SQL procedure.
 6 
SQLCSRC is an output data set that specifies the library into which DSNTPSMP puts the C source code that it generates from the external SQL procedure source code. This data set should have a logical record length of 80.
 7 
SQLLMOD is an output data set that specifies the library into which DSNTPSMP puts the load module that it generates when it compiles and link-edits your external SQL procedure.
 8 
SQLLIBC specifies the library that contains standard C header files. This library is used during compilation of the generated C program.
 9 
SQLLIBL specifies the following libraries, which DSNTPSMP uses when it link-edits the external SQL procedure:
  • Language Environment link-edit library
  • Db2 load library
 10 
SYSMSGS specifies the library that contains messages that are used by the C prelink-edit utility.
 11 
CFGTPSMP specifies an optional data set that you can use to customize DSNTPSMP, including specifying the compiler level. For details on all of the options that you can set in this file and how to set them, see the DSNTPSMP CLIST comments.
 12 
The DD statements that follow describe work file data sets that are used by DSNTPSMP.