Re: Overrides (was: REXX as JCL replacement)
The syntax using stepname (not procstep name) is used because there is no nested procedure in that refer back. By that I mean, the reference is not to a DD within a proc invoked by the procedure. That is how I've always viewed it. I reread the JCL manual concerning backward references and it does not make that clear. But it does say *.stepname.ddname Asks the system to copy the data set name from DD statement, ddname, in an earlier step, stepname, in the same job. *.stepname.procstepname.ddname Asks the system to copy the data set name from a DD statement in a cataloged or in-stream procedure. Stepname is the name of this job step or an earlier job step that calls the procedure, procstepname is the name of the procedure step that contains the DD statement, and ddname is the name of the DD statement. >From which I imply that if you invoke a proc and want to refer to/override a >DD in that proc, you need to add procstep name to your reference, else its any >DD in the same job. JCL in the job that invokes the proc would need procstep >name. JCL within the proc would not. How many levels of nesting would that >remain true? I suspect just the one. I did not have much success having a >proc invoke a proc and try to override, in Job JCL or within the first proc, >DD statements in the nested proc. Cliff >The proc author probably wouldn't do in that manner. Look at excerpt below, >notice how LKED SYSLIN is referencing a dsn from a previous step? > >SYS1.PROCLIB(IBMZCPLG) - 01.01 Columns > ===> Scroll == >//* >//* PRE-LINK-EDIT STEP >//* >//PLKEDEXEC PGM=EDCPRLK,COND=(8,LT,PLI) >//... >//SYSMOD DD DSN=&PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)), >// DCB=(RECFM=FB,LRECL=80,BLKSIZE=) >//* >//* LINK-EDIT STEP >//* >//LKED EXEC PGM=IEWL,PARM='XREF',COND=((8,LT,PLI),(8,LE,PLKED)) >//... >//SYSLIN DD DSN=*.PLKED.SYSMOD,DISP=(OLD,DELETE) > Suppose the end user calls this with: //FOOBAR EXEC PROC=IBMZXPLG,... Doesn't the referback need to cite the job step, as in: //SYSLIN DD DSN=*.FOOBAR.PLKED.SYSMOD,DISP=(OLD,DELETE) ... but the author of the PROC can't know a priori the callers jobstep name. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Overrides (was: REXX as JCL replacement)
Paul, No, the PROC referback does NOT need to know the step name that invoked the PROC. It is the nearest prior procstepname that is referenced, so multiple compile PROC executions in the same job work just fine and refer to the correct dataset. AFAIK , that's been the case since PROC's were first introduced. Peter -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Wednesday, July 11, 2018 3:48 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Overrides (was: REXX as JCL replacement) On Wed, 11 Jul 2018 19:30:16 +, Clifford McNeill wrote: >The proc author probably wouldn't do in that manner. Look at excerpt below, >notice how LKED SYSLIN is referencing a dsn from a previous step? > >SYS1.PROCLIB(IBMZCPLG) - 01.01 Columns > ===> Scroll == >//* >//* PRE-LINK-EDIT STEP >//* >//PLKEDEXEC PGM=EDCPRLK,COND=(8,LT,PLI) >//... >//SYSMOD DD DSN=&PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)), >// DCB=(RECFM=FB,LRECL=80,BLKSIZE=) >//* >//* LINK-EDIT STEP >//* >//LKED EXEC PGM=IEWL,PARM='XREF',COND=((8,LT,PLI),(8,LE,PLKED)) >//... >//SYSLIN DD DSN=*.PLKED.SYSMOD,DISP=(OLD,DELETE) > Suppose the end user calls this with: //FOOBAR EXEC PROC=IBMZXPLG,... Doesn't the referback need to cite the job step, as in: //SYSLIN DD DSN=*.FOOBAR.PLKED.SYSMOD,DISP=(OLD,DELETE) ... but the author of the PROC can't know a priori the callers jobstep name. -- 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Overrides (was: REXX as JCL replacement)
On Wed, 11 Jul 2018 19:30:16 +, Clifford McNeill wrote: >The proc author probably wouldn't do in that manner. Look at excerpt below, >notice how LKED SYSLIN is referencing a dsn from a previous step? > >SYS1.PROCLIB(IBMZCPLG) - 01.01 Columns > ===> Scroll == >//* >//* PRE-LINK-EDIT STEP >//* >//PLKEDEXEC PGM=EDCPRLK,COND=(8,LT,PLI) >//... >//SYSMOD DD DSN=&PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)), >// DCB=(RECFM=FB,LRECL=80,BLKSIZE=) >//* >//* LINK-EDIT STEP >//* >//LKED EXEC PGM=IEWL,PARM='XREF',COND=((8,LT,PLI),(8,LE,PLKED)) >//... >//SYSLIN DD DSN=*.PLKED.SYSMOD,DISP=(OLD,DELETE) > Suppose the end user calls this with: //FOOBAR EXEC PROC=IBMZXPLG,... Doesn't the referback need to cite the job step, as in: //SYSLIN DD DSN=*.FOOBAR.PLKED.SYSMOD,DISP=(OLD,DELETE) ... but the author of the PROC can't know a priori the callers jobstep name. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Overrides (was: REXX as JCL replacement)
The proc author probably wouldn't do in that manner. Look at excerpt below, notice how LKED SYSLIN is referencing a dsn from a previous step? SYS1.PROCLIB(IBMZCPLG) - 01.01 Columns ===> Scroll == //* //* PRE-LINK-EDIT STEP //* //PLKEDEXEC PGM=EDCPRLK,COND=(8,LT,PLI) //STEPLIB DD DSN=,DISP=SHR //SYSMSGS DD DSN=(),DISP=SHR //SYSLIB DD DUMMY //SYSMOD DD DSN=&,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=) //SYSIN DD DSN=*.PLI.SYSLIN,DISP=(OLD,DELETE) //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //* //* LINK-EDIT STEP //* //LKED EXEC PGM=IEWL,PARM='XREF',COND=((8,LT,PLI),(8,LE,PLKED)) //SYSLIB DD DSN=,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSLIN DD DSN=*.PLKED.SYSMOD,DISP=(OLD,DELETE) Cliff McNeill From: IBM Mainframe Discussion List on behalf of Paul Gilmartin <000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Wednesday, July 11, 2018 2:10 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Overrides (was: REXX as JCL replacement) On Wed, 11 Jul 2018 10:35:08 -0700, Lizette Koehler wrote: >I would include the caveat > >Even though it is available, do not use Nested procs. Trying to override a >proc within a proc within a proc .. rarely succeeds. > I can't decide whether the author of the original RFE overlooked a requirement, perhaps assuming it was implicit, or IBM shirked the implementation. There ougnt to be an extended syntax, such as: //refdd DD sysxxx=*.jobstep.procstep.subprocstep.subsub ... .ddname BTW, what's the syntax by which a procstep can refer to a data set passed from an earlier procstep? Such as //MAKE PROC //C EXEC PGM=COMPILER,... //SYSPUNCH DDDISP=(,PASS), ... //L EXEC PGM=IEWL //SYSLINDDDISP=(OLD,PASS),DSN=*..C.SYSPUNCH It seems the author of the PROC needs to know, but can't know, the user's job step name to code as the . What am I missing? -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN