> -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On > Behalf Of Frank Swarbrick > Sent: Thursday, October 30, 2008 8:16 PM > To: [email protected] > Subject: Re: using nexted procs > > On Thu, 30 Oct 2008 19:27:02 -0400, Farley, Peter x23353 > <[EMAIL PROTECTED]> wrote: <Snipped> > >IOW, you cannot override/add/DUMMY or any other normal JCL DD operation > >on anything inside of an "inner" PROC, except with symbolic parameters. > >AFAIK, no external DD overrides or EXEC overrides (REGION.stepname, > >etc.) are permitted for the steps inside of an "inner" PROC. > > This all agrees with what I have read. Unfortunately it does not agree > with what I want! :-) I wonder why the restriction exists. It seems > to me that something like FFND05.DLI.FFMOTBL would be perfect! Or perhaps > DLIBATCH.DLI.FFMOTBL; in other words "procname.procstepname.ddname". > Ah well, I'm probably not going to win over 40 years of history...
I didn't understand the restriction myself when I first heard about it. Unless I'm missing some crucial detail, it would not have broken any existing JCL or PROC when nested PROC's were first introduced, though now that it's been around for a while perhaps it would. <Snipped> > I was discussing this with a co-worker who came to us with z/OS > experience, but he'd never tried nested procs. We may try your solution, > but here's another one we thought of: <Example snipped> Not having taken advantage of the INCLUDE command yet, I found it most interesting that this technique works. Who says you can't teach an old dog new tricks! And it can even work for multi-step PROC's. I tried this and it actually works: //FFND05 JOB CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //PROCLIBS JCLLIB ORDER=(FJS.PDSE.PROC) //JOBLIBS INCLUDE MEMBER=JOBLIBS //*------------------------------------------------- //FFND05 PROC // SET DLIPGM=FFND05 // SET DLIPSB=FFUNDGO // INCLUDE MEMBER=EXECDLI1 //FFUNDDB DD DSNAME=FJS.FFND.IMS.FFUNDDB,DISP=SHR //FFUNDIN DD DSNAME=FJS.FFND.IMS.FFUNDIN,DISP=SHR //FFMOTBL DD DSNAME=FJS.FFND.FFMOTBL,DISP=SHR //DRPT DD SYSOUT=* //MRPT DD SYSOUT=* // INCLUDE MEMBER=EXECDLI2 //FFUNDDB DD DSNAME=FJS.FFND.IMS.FFUNDDB,DISP=SHR //FFUNDIN DD DSNAME=FJS.FFND.IMS.FFUNDIN,DISP=SHR //FFMOTBL DD DSNAME=FJS.FFND.FFMOTBL,DISP=SHR //DRPT DD SYSOUT=* //MRPT DD SYSOUT=* // PEND //*------------------------------------------------- // EXEC PROC=FFND05 //DLI1.FFMOTBL DD DSNAME=FJS.FFND.COPY.FFMOTBL,DISP=SHR //DLI2.FFMOTBL DD DSNAME=FJS.FFND.COPY.FFMOTBL,DISP=SHR // Where EXECDLI1 is: // SET DBRC=N //DLI1 EXEC PGM=DFSRRC00, // PARM=(DBB,&DLIPGM,&DLIPSB,,,,,,,,,,,&DBRC) //IMSACB DD DISP=SHR,DSN=&SYSUID..IMS.ACBLIB // DD DISP=SHR,DSN=SYS4.IMS.ACBLIB //IEFRDER DD DUMMY //SYSUOUT DD SYSOUT=* //DFSVSAMP DD DISP=SHR,DSN=FJS.PDSE.CNTL(VSAMBUF) And EXECDLI2 is: // SET DBRC=N //DLI2 EXEC PGM=DFSRRC00, // PARM=(DBB,&DLIPGM,&DLIPSB,,,,,,,,,,,&DBRC) //IMSACB DD DISP=SHR,DSN=&SYSUID..IMS.ACBLIB // DD DISP=SHR,DSN=SYS4.IMS.ACBLIB //IEFRDER DD DUMMY //SYSUOUT DD SYSOUT=* //DFSVSAMP DD DISP=SHR,DSN=FJS.PDSE.CNTL(VSAMBUF) Note that the stepnames of the INCLUDEd steps must be unique constants. You cannot use a variable in the JCL label field, so this would be illegal: //FFND05 PROC // SET DLIPGM=FFND05 // SET DLIPSB=FFUNDGO // SET SNO=1 // INCLUDE MEMBER=EXECDLI // PEND Where EXECDLI has this line: //DLI&SNO EXEC PGM=DFSRRC00, // PARM=(DBB,&DLIPGM,&DLIPSB,,,,,,,,,,,&DBRC) HOWEVER, this technique does work: //FFND05 PROC // SET DLIPGM=FFND05 // SET DLIPSB=FFUNDGO // SET SNO=1 // INCLUDE MEMBER=EXECDLI // INCLUDE MEMBER=FILEAPPL // SET SNO=2 // INCLUDE MEMBER=EXECDLI // INCLUDE MEMBER=FILEAPPL // PEND //*------------------------------------------------- // EXEC PROC=FFND05 //DLI1.FFMOTBL DD DSNAME=FJS.FFND.COPY.FFMOTBL,DISP=SHR //DLI2.FFMOTBL DD DSNAME=FJS.FFND.COPY.FFMOTBL,DISP=SHR // Member EXECDLI has just one line: // INCLUDE MEMBER=EXECDLI&SNO Member EXECDLI1 is just 4 lines: // SET DBRC=N //DLI1 EXEC PGM=DFSRRC00, // PARM=(DBB,&DLIPGM,&DLIPSB,,,,,,,,,,,&DBRC) // INCLUDE MEMBER=FILEDLI And similarly for member EXECDLI2 where the stepname is DLI2. Member FILEDLI is: //IMSACB DD DISP=SHR,DSN=&SYSUID..IMS.ACBLIB // DD DISP=SHR,DSN=SYS4.IMS.ACBLIB //IEFRDER DD DUMMY //SYSUOUT DD SYSOUT=* //DFSVSAMP DD DISP=SHR,DSN=FJS.PDSE.CNTL(VSAMBUF) And member FILEAPPL is: //FFUNDDB DD DSNAME=FJS.FFND.IMS.FFUNDDB,DISP=SHR //FFUNDIN DD DSNAME=FJS.FFND.IMS.FFUNDIN,DISP=SHR //FFMOTBL DD DSNAME=FJS.FFND.FFMOTBL,DISP=SHR //DRPT DD SYSOUT=* //MRPT DD SYSOUT=* I think that's pretty neat. HTH Peter This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- 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

