So here's what I've got working. Not the most obvious thing in the world, but
it seems to work. It forces me to use STEPLIB instead of JOBLIB for my LOADLIB
concatenation, which I don't prefer, but I can live with it.
'DVFJS.APPLIB.PARM(CEEROPT)':
CEEROPT CSECT
CEEROPT AMODE ANY
CEEROPT RMODE ANY
CEEXOPT ENVAR=(('&SYSPARM'),OVR)
END
PUNCH ' ENTRY CEEROPT'
PUNCH ' ORDER CEEROPT'
PUNCH ' NAME CEEROPT(R)'
END
'DVFJS.APPLIB.PROC(SETENVAR)':
//SETENVAR PROC ENVAR=
//ASSEM EXEC PGM=ASMA90,PARM='SYSPARM(&ENVAR)'
//SYSPRINT DD DUMMY
//SYSLIN DD DISP=(,PASS),SPACE=(TRK,(1,1,1))
//SYSLIB DD DSN=CEE.SCEEMAC,DISP=SHR
// DD DSN=SYS1.MACLIB,DISP=SHR
//SYSIN DD DISP=SHR,DSN=DVFJS.APPLIB.PARM(CEEROPT)
//LKED EXEC PGM=IEWL
//SYSPRINT DD DUMMY
//SYSLMOD DD DSN=&&ENVARLIB,
// DISP=(NEW,PASS),SPACE=(TRK,(1,1,1)),
// DCB=(BLKSIZE=32760,LRECL=0,RECFM=U,DSORG=PO)
//SYSLIN DD DSN=*.ASSEM.SYSLIN,DISP=(OLD,DELETE)
// PEND
'DVFJS.WORK.JOB(ENVTEST1)':
//ENVTEST1 JOB NOTIFY=&SYSUID
// JCLLIB ORDER=(&SYSUID..APPLIB.PROC)
//SETENVAR EXEC PROC=SETENVAR,ENVAR='DB2PLAN=PLNDB2X'
//TEST1 EXEC PGM=SKEL,PARM='/RPTOPTS(ON)'
//STEPLIB DD DSN=&&ENVARLIB,DISP=(OLD,PASS)
// DD DSN=&SYSUID..APPLIB.LOAD,DISP=SHR
// DD DSN=PROD.APPLIB.LOAD,DISP=SHR
//TEST2 EXEC PGM=SKEL,PARM='/RPTOPTS(ON)'
//STEPLIB DD DSN=&SYSUID..APPLIB.LOAD,DISP=SHR
// DD DSN=PROD.APPLIB.LOAD,DISP=SHR
//TEST3 EXEC PGM=SKEL,PARM='/RPTOPTS(ON)'
//STEPLIB DD DSN=&&ENVARLIB,DISP=(OLD,PASS)
// DD DSN=&SYSUID..APPLIB.LOAD,DISP=SHR
// DD DSN=PROD.APPLIB.LOAD,DISP=SHR
//TEST4 EXEC PGM=SKEL,PARM='/ENVAR(TESTPARM=TEST),RPTOPTS(ON)'
//STEPLIB DD DSN=&&ENVARLIB,DISP=(OLD,PASS)
// DD DSN=&SYSUID..APPLIB.LOAD,DISP=SHR
// DD DSN=PROD.APPLIB.LOAD,DISP=SHR
//CEEOPTS DD *
ENVAR(TESTOPTS=TEST)
//
Results as follows:
CEEMSG TEST1:
Installation default ENVAR("")
Region default ENVAR("DB2PLAN=PLNDB2X")
CEEMSG TEST2:
Installation default ENVAR("")
CEEMSG TEST3:
Installation default ENVAR("")
Region default ENVAR("DB2PLAN=PLNDB2X")
CEEMSG TEST4:
Installation default ENVAR("")
Region default ENVAR("DB2PLAN=PLNDB2X")
DD:CEEOPTS ENVAR("TESTOPTS=TEST")
Invocation command ENVAR("TESTPARM=TEST")
Pretty nice. Still would like a more officially supported way of doing with
this, but I think this will work for now.
All comments welcome!
Frank
--
Frank Swarbrick
Applications Architect - Mainframe Applications Development
FirstBank Data Corporation - Lakewood, CO USA
P: 303-235-1403
The information contained in this electronic communication and any document
attached hereto or transmitted herewith is confidential and intended for the
exclusive use of the individual or entity named above. If the reader of this
message is not the intended recipient or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that any
examination, use, dissemination, distribution or copying of this communication
or any part thereof is strictly prohibited. If you have received this
communication in error, please immediately notify the sender by reply e-mail
and destroy this communication. Thank you.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html