// DD DISP=SHR,DSN=prefix.SDSNEXIT
// DD DISP=SHR,DSN=prefix.SDSNLOAD
//UTPRINT DD SYSOUT=*
//RNPRIN01 DD SYSOUT=*
//DSSPRINT DD SYSOUT=*
//SYSIN DD UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)
//SYSPRINT DD UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)
为通用情况准备的存储过程
另外,我们为大多数的存储过程准备了一套运行环境,所准备的启动作业如下所示,其中 NUMTCB 可以根据系统资源情况来定,一般推荐可以设置为 40 或 60。
清单 4. 通用情况下存储过程对应的 STC 作业
//DB11WLM2 PROC APPLENV=DB11WLM2,DB2SSN=DSN,RGN=0K,NUMTCB=40
//IEFPROC EXEC PGM=DSNX9WLM,REGION=&RGN,TIME=NOLIMIT,
// PARM=''&DB2SSN,&NUMTCB,&APPLENV''
//STEPLIB DD DISP=SHR,DSN=prefix.SCEERUN
//* DD DISP=SHR,DSN=prefix.SDFHEXCI For CICS
// DD DISP=SHR,DSN=prefix.SDSNEXIT
// DD DISP=SHR,DSN=prefix.SDSNLOAD
//* DD DISP=SHR,DSN=prefix.SCSQLOAD For MQ
//* DD DISP=SHR,DSN=prefix.SCSQAUTH For MQ
//* DD DISP=SHR,DSN=prefix.SCSQANLE For MQ
//*SYSIN DD SYSOUT=* For Debugger and XML
//*SYSPRINT DD SYSOUT=*
//*WSERROR DD PATH=''/tmp/wsc.err'', For WEB_SERVICES
//* PATHOPTS=(ORDWR,OCREAT,OAPPEND),
//* PATHMODE=(SIRUSR,SIWUSR,SIRGRP,SIWGRP,SIROTH,SIWOTH)
REXX 语言编写的存储过程
对于由 REXX 语言写的存储过程来说,启动作业同其他类型的存储过程是不同的。见下面的例子。需要特别提出的是,REXX 类型的存储过程的 NUMTCB 应该设为 1。
清单5. REXX 存储过程对应的STC作业
//DB11WLMR PROC APPLENV=DB11WLM_REXX,DB2SSN=DSN,RGN=0K,NUMTCB=1
//IEFPROC EXEC PGM=DSNX9WLM,REGION=&RGN,TIME=NOLIMIT,
// DYNAMNBR=5, <== Allow for Dyn Allocs
// PARM=''&DB2SSN,1,&APPLENV'' <== Use 1, not NUMTCB
//*
//NUMTCB@1 SET NUMTCB= <== Null NUMTCB symbol
//*
//* Include SDSNEXIT to use Secondary Authids (DSN3@ATH DSN3@SGN exits)
//STEPLIB DD DISP=SHR,DSN=prefix.RUNLIB.LOAD
// DD DISP=SHR,DSN=CBC!!.SCCNCMP <== C Compiler
// DD DISP=SHR,DSN=prefix.SCEERUN <== LE runtime
// DD DISP=SHR,DSN=prefix.SDSNEXIT
// DD DISP=SHR,DSN=prefix.SDSNLOAD
//SYSEXEC DD DISP=SHR,DSN=DSN!!0.SDSNCLST <== Location of DSNTPSMP
//SYSTSPRT DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSABEND DD DUMMY
//DSNTRACE DD SYSOUT=*
//*
//**** Data sets required by the SQL Procedures Processor
//SQLDBRM DD DISP=SHR, <== DBRM Library
// DSN=DSN!!0.DBRMLIB.DATA
//SQLCSRC DD DISP=SHR, <== Generated C Source
// DSN=DSN!!0.SRCLIB.DATA
//SQLLMOD DD DISP=SHR, <== Application Loadlib
// DSN=DSN!!0.RUNLIB.LOAD
//SQLLIBC DD DISP=SHR, <== C header files
// DSN=CEE!!.SCEEH.H
// DD DISP=SHR,
// DSN=CEE!!.SCEEH.SYS.H
// DD DISP=SHR, <== Debug header file
// DSN=DSN!!0.SDSNC.H
//SQLLIBL DD DISP=SHR, <== Linkedit includes
// DSN=CEE!!.SCEELKED
// DD DISP=SHR,
// DSN=DSN!!0.SDSNLOAD
//SYSMSGS DD DISP=SHR, <== Prelinker msg file
// DSN=CEE!!.SCEEMSGP(EDCPMSGE)
//*
//**** DSNTPSMP Configuration File - CFGTPSMP (optional)
//* A site provided sequential dataset or member, used to
//* define customized operation of DSNTPSMP in this APPLENV.
//*CFGTPSMP DD DISP=SHR,DSN=
//*
//**** Workfiles required by the SQL