If you run zSecure on many LPARs you may have wondered how to generate CARLa commands containing the system name. For example, to put the local system name into a qualifier of input or output dsnames. Previously, I would have told you to use a hybrid of JCL DD and CARLa ALLOC commands like the sample in SCKRSAMP(C2PJCOND):
// SET PREFIX=C2PACMON.&SYSNAME
// SET MONTH=2012
//CKRCARLA EXEC PGM=CKRCARLA,REGION=200M
//STEPLIB DD DISP=SHR,DSN=&CPREFIX..SCKRLOAD
//C2PACMON DD DSN=&PREFIX..M&MONTH,
// DISP=(NEW,CATLG),VOL=SER=&VOLSER.,
// SPACE=(CYL,(1,1)),
// RECFM=VB,LRECL=584,BLKSIZE=27998
//SYSPRINT DD SYSOUT=*
//SYSIN DD DATA,DLM=##
ALLOC TYPE=ACCESS DSNPREF=C2PACMON.IPO1.D2012
ALLOC TYPE=OUTPUT DD=C2PACMON
INCLUDE DD=SC2PSAMP MEMBER=C2PAMCON
##
//SC2PSAMP DD DISP=SHR,DSN=&C2PACPRM
// DD DISP=SHR,DSN=&CPREFIX..SCKRCARL
But you can see that some parameters only work well in a CARLa command and cannot simply substitute.
On the other hand, the JCL EXPORT command in combination with the SYMBOLS keyword on the DD statement makes JCL symbols available in in-stream data sets, so this is what my new monthly consolidation job would look like:
//JCLLIB JCLLIB ORDER=(IBMSEC.ZSECURE.CKRPARM,
// SYS1.SCKRPROC)
// INCLUDE MEMBER=C2R$PARM
//*
// EXPORT SYMLIST=(PREFIX,YEAR,MONTH)
//*
// SET PREFIX=C2PACMON.&SYSNAME
// SET YEAR=20
// SET MONTH=12
//*
//* Consolidation of daily file(s) into a single monthly file
//*
//CKRCARLA EXEC C2RC,CONFIG=C2R$VOID,REGION=64M
//SYSIN DD DATA,DLM=##,SYMBOLS=JCLONLY
ALLOC TYPE=ACCESS DSNPREF=&PREFIX..D&YEAR.&MONTH
ALLOC TYPE=OUTPUT DD=C2PACMON DSN=&PREFIX..M&YEAR.&MONTH,
NEW MB_PRIM=10 MB_SEC=10
INCLUDE DD=SC2PSAMP MEMBER=C2PAMCON
##
//SC2PSAMP DD DISP=SHR,DSN=&C2PACPRM
// DD DISP=SHR,DSN=&CPREFIX..SCKRCARL
The & symbols are substituted by the JCL convertor because I added the SYMBOLS=JCLONLY keyword. The variables available for substitution are listed in the EXPORT command that must precede assignment (SET) of each symbol. And CARLa knows how to allocate (new) data sets.
SYMBOLS keyword
EXPORT command
If you want to use system symbols in your CARLa command, you should decide where the substitution has to happen: on the system where the JCL is converted or on the system where the job eventually runs. When you have chose, you can replace the SYMBOLS=JCLONLY keyword with SYMBOLS=CNVTSYS or with SYMBOLS=EXECSYS, resp.
------------------------------
Rob van Hoboken
------------------------------