Discussion:
Overrides (was: REXX as JCL replacement)
(too old to reply)
Paul Gilmartin
2018-07-11 19:11:02 UTC
Permalink
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 DD DISP=(,PASS),
...
//L EXEC PGM=IEWL
//SYSLIN DD DISP=(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 ***@listserv.ua.edu with the message: INFO IBM-MAIN
Clifford McNeill
2018-07-11 19:30:28 UTC
Permalink
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 0000
===> Scroll ==
//*********************************************************************
//* PRE-LINK-EDIT STEP
//*********************************************************************
//PLKED EXEC PGM=EDCPRLK,COND=(8,LT,PLI)
//STEPLIB DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
//SYSMSGS DD DSN=&LIBPRFX..SCEEMSGP(&PLANG),DISP=SHR
//SYSLIB DD DUMMY
//SYSMOD DD DSN=&&PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=&SYSLBLK)
//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=&LIBPRFX..SCEELKED,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSN=*.PLKED.SYSMOD,DISP=(OLD,DELETE)


Cliff McNeill

________________________________
From: IBM Mainframe Discussion List <IBM-***@LISTSERV.UA.EDU> on behalf of Paul Gilmartin <0000000433f07816-dmarc-***@LISTSERV.UA.EDU>
Sent: Wednesday, July 11, 2018 2:10 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: Overrides (was: REXX as JCL replacement)
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 DD DISP=(,PASS),
...
//L EXEC PGM=IEWL
//SYSLIN DD DISP=(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 ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Paul Gilmartin
2018-07-11 19:48:06 UTC
Permalink
Post by Clifford McNeill
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 0000
===> Scroll ==
//*********************************************************************
//* PRE-LINK-EDIT STEP
//*********************************************************************
//PLKED EXEC PGM=EDCPRLK,COND=(8,LT,PLI)
// ...
//SYSMOD DD DSN=&&amp;PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=&SYSLBLK)
//*********************************************************************
//* 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 ***@listserv.ua.edu with the message: INFO IBM-MAIN
Farley, Peter x23353
2018-07-11 20:06:17 UTC
Permalink
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-***@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin
Sent: Wednesday, July 11, 2018 3:48 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: Overrides (was: REXX as JCL replacement)
Post by Clifford McNeill
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 0000
===> Scroll ==
//*********************************************************************
//* PRE-LINK-EDIT STEP
//*********************************************************************
//PLKED EXEC PGM=EDCPRLK,COND=(8,LT,PLI)
// ...
//SYSMOD DD DSN=&&amp;PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=&SYSLBLK)
//*********************************************************************
//* 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 ***@listserv.ua.edu with the message: INFO IBM-MAIN
Clifford McNeill
2018-07-11 22:03:32 UTC
Permalink
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


________________________________
Post by Clifford McNeill
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 0000
===> Scroll ==
//*********************************************************************
//* PRE-LINK-EDIT STEP
//*********************************************************************
//PLKED EXEC PGM=EDCPRLK,COND=(8,LT,PLI)
// ...
//SYSMOD DD DSN=&&amp;PLNK,DISP=(,PASS),UNIT=SYSALLDA,SPACE=(CYL,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=&SYSLBLK)
//*********************************************************************
//* 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 ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...