Executing a Proclib within a Proclib with over rides
Moderators: Frank Yaeger, DikDude, Moderator Group
Executing a Proclib within a Proclib with over rides
Hello eveyone...
This is the first shop I have ever worked in that has a main proclib member that executes another proclib member to perform a sort.
What I am trying to figure out is how to do this, but code in the JCL an override for any of the DDcards in the sort proclib member.
I am aware that from the JCL one can code:
proclibstep.ddcard dd DSN=
or
proclibstep.sysin dd dsn=
etc..
etc..
I am seeking your assistance to figure out how to code an override to accomplish something like:
JCL member
//jobname job (accounting stuff),'comment',
// notify=me,
// class=runin,
// msglevel=(x,y),
// msgclass=a
//proclib jclliborder=(my.proclib, test.proclib, prod.proclib)
//joblib dd dsn=prod.loadlib,disp=shr
// dd dsn=db2.alias.prod.dsnload,disp=shr
// include member=otherlib
//
//step10 exec proc1
//procst10.sysin dd dsn=sortcard,disp=shr
proc1 member
//proc1 proc,
// parm1=dummy,
// parm2=dummy
//procst10 exec pgm=something
//sortin dd dsn=in,disp=shr
//sortout dd dsn=out,disp=(new,catlg,delete),
// recfm=*.sortin,
// space=(trk,(5,5),rlse)
//sysin dd dsn=prod.sortin(prodsort),disp=shr
:
:
:
//procst50 exec sort
//sortin dd dsn=in2,disp=shr
//sortout dd dsn=out2,disp=(new,catlg,delete),
// recfm=*.sortin2,
// space=(trk,(5,5),rlse)
//sysin dd dsn=prod.sortin2(prodsrt2),disp=shr
*** It would be the different dd cards in the //procst50 exec sort that I am seeking to override from the JCL.
Does this make sense?
Thanks!
PS... I "scoured" the web for an answer/example, but did not quite enter the right search terms to find one.
This is the first shop I have ever worked in that has a main proclib member that executes another proclib member to perform a sort.
What I am trying to figure out is how to do this, but code in the JCL an override for any of the DDcards in the sort proclib member.
I am aware that from the JCL one can code:
proclibstep.ddcard dd DSN=
or
proclibstep.sysin dd dsn=
etc..
etc..
I am seeking your assistance to figure out how to code an override to accomplish something like:
JCL member
//jobname job (accounting stuff),'comment',
// notify=me,
// class=runin,
// msglevel=(x,y),
// msgclass=a
//proclib jclliborder=(my.proclib, test.proclib, prod.proclib)
//joblib dd dsn=prod.loadlib,disp=shr
// dd dsn=db2.alias.prod.dsnload,disp=shr
// include member=otherlib
//
//step10 exec proc1
//procst10.sysin dd dsn=sortcard,disp=shr
proc1 member
//proc1 proc,
// parm1=dummy,
// parm2=dummy
//procst10 exec pgm=something
//sortin dd dsn=in,disp=shr
//sortout dd dsn=out,disp=(new,catlg,delete),
// recfm=*.sortin,
// space=(trk,(5,5),rlse)
//sysin dd dsn=prod.sortin(prodsort),disp=shr
:
:
:
//procst50 exec sort
//sortin dd dsn=in2,disp=shr
//sortout dd dsn=out2,disp=(new,catlg,delete),
// recfm=*.sortin2,
// space=(trk,(5,5),rlse)
//sysin dd dsn=prod.sortin2(prodsrt2),disp=shr
*** It would be the different dd cards in the //procst50 exec sort that I am seeking to override from the JCL.
Does this make sense?
Thanks!
PS... I "scoured" the web for an answer/example, but did not quite enter the right search terms to find one.
Scott M
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Over ride dd cards in a proc executed by a proc....
William Collins wrote:Can you show the SORT PROC, please, in the Code tags to preserve spacing/improve readability.
Code: Select all
//SORTGWC PROC OUTC='*', SYSOUT CLASS
// PRIM1='1', SORTWK01 PRIMARY CYLINDERS
// SEC1='1', SORTWK01 SECONDARY CYLINDERS
// PRIM2='1', SORTWK02 & 03 PRIMARY CYLINDERS
// SEC2='1', SORTWK02 & 03 SECONDARY CYLINDERS
//* DB2SYS=xxxx, DB2 REGION - PROD
// DB2SYS=yyyy, DB2 REGION - TEST
//* DB2LVL=x DB2 LEVEL - PROD
// DB2LVL=y DB2 LEVEL - TEST
//SORT1 EXEC PGM=SORT,REGION=64M
//STEPLIB DD DISP=SHR,DSN=&DB2LVL.DB2&DB2SYS..DB2.SDSNLOAD
//SYSOUT DD SYSOUT=&OUTC
//DONTWK01 DD DUMMY,SPACE=(CYL,(&PRIM1,&SEC1))
//DONTWK02 DD DUMMY,SPACE=(CYL,(&PRIM2,&SEC2))
//DONTWK03 DD DUMMY,SPACE=(CYL,(&PRIM2,&SEC2))
I was coding an override as:
Code: Select all
//procstep.sort.sysin dd dsn=
I probably need to code as:
//sortgwc.sysin dd dsn=
//sortgwc.sortin dd dsn=
//sortgwc.sortout dd dsn=
Code: Select all
//sortgwc.sortin dd dsn=file1,disp=shr
// dd dsn=file2,disp=shr
// dd dsn=file3,disp=shr
//sortgwc.sort01 dd dsn=out1,
// disp=(new,catlg,delete),
// dcb=(recfm=fb,lrecl=2000,blksize=0,dsorg=ps),
// space=(trk,(5,5),rlse)
Scott M
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
Although it is in a PROC, it is still the "step" that you are overriding.
I'd ditch the DCB for sort01 (did you mean SORTOUT?, or is it an OUTFIL dataset?) as Sort will provide it for you, meaning it only gets done in one place (an you can change the sort cards by one byte without having to worry about changing the JCL).
Code: Select all
//sort1.sortin dd dsn=file1,disp=shr
// dd dsn=file2,disp=shr
// dd dsn=file3,disp=shr
//sort1.sort01 dd dsn=out1,
// disp=(new,catlg,delete),
// dcb=(recfm=fb,lrecl=2000,blksize=0,dsorg=ps),
// space=(trk,(5,5),rlse)
over ride ddcards for a proc called by a proc
JCL step that executes the 1st proclib:
I apologize, I should have shown the original first-level proclib step:
proc1
:
:
:
sort proc being executed by above proclib step:
Would I need to code in the JCL step:
Now I feel better about giving all of the facts & info in one msg to the board.
[/code]
Code: Select all
//STEP0020 EXEC proc1,
// SYS1=xxxx,
// SYS2=x,
// DATAIN=input1,
// XREF=xxx,
// INRECL=2000,
// DB2SYS=xxxx,
// SFX=D021313.T160800
//*
//STPR0060.TOOLIN DD DSN=TEST.SYSIN(toolin1),DISP=SHR
I apologize, I should have shown the original first-level proclib step:
proc1
:
:
:
Code: Select all
//STPR0070 EXEC SORT
//*=========================================================//*
//SORTIN DD DSN=input1,
// DISP=SHR
//*
//SORTOUT DD DSN=output1,
// DATACLAS=STANDSEQ,
// DCB=(RECFM=FB,LRECL=&INRECL,BLKSIZE=0),
// DISP=(NEW,CATLG,DELETE)
//*
//SYSIN DD DISP=SHR,DSN=PROD.SYSIN(sortcard)
//*
//SYSOUT DD SYSOUT=*
//*
sort proc being executed by above proclib step:
Code: Select all
//SORTGWC PROC OUTC='*', SYSOUT CLASS
// PRIM1='1', SORTWK01 PRIMARY CYLINDERS
// SEC1='1', SORTWK01 SECONDARY CYLINDERS
// PRIM2='1', SORTWK02 & 03 PRIMARY CYLINDERS
// SEC2='1', SORTWK02 & 03 SECONDARY CYLINDERS
// DB2SYS=yyyy, DB2 REGION - TEST
// DB2LVL=y DB2 LEVEL - TEST
//SORT1 EXEC PGM=SORT,REGION=64M
//STEPLIB DD DISP=SHR,DSN=&DB2LVL.DB2&DB2SYS..DB2.SDSNLOAD
//SYSOUT DD SYSOUT=&OUTC
//DONTWK01 DD DUMMY,SPACE=(CYL,(&PRIM1,&SEC1))
//DONTWK02 DD DUMMY,SPACE=(CYL,(&PRIM2,&SEC2))
//DONTWK03 DD DUMMY,SPACE=(CYL,(&PRIM2,&SEC2))
Code: Select all
//sortgwc.stpr0070.sysin dd dsn=test.sysin(sortcard),disp=shr
[/code]
Scott M
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
over ride ddcards for a proc called by a proc
I do apologize.
JCL(job1) executes a PROCLIB(proc1) which executes/calls a sort PROCLIB(sort).
JCL (job1)
PROCLIB (proc1)
PROCLIB (sort)
I am wanting to figure out how I can override 1 or more of the ddcards in the PROCLIB (sort) from the JCLLIB (job1).
Understanding that usually one just codes something like the following to override a ddcard in the PROCLIB (proc1):
//procstep.ddcard override information
My goal is to override one or more ddcards in the 3rd level PROCLIB (sort).
So, do I code it like the following in the JCLLIB (job1) following the execution stmnt of the PROCLIB (proc1):
//proc1step.ddcard dd "override statement"
or
//proc1step.sortproc.ddcard dd "override statement"
or
//sortproc.proc1step.ddcard dd "override statement"
[/code]
I'm pretty sure I will get it explained correctly soon. I hope it is with this post so I don't aggrevate you or anyone else, futher.
Thanks!
JCL(job1) executes a PROCLIB(proc1) which executes/calls a sort PROCLIB(sort).
JCL (job1)
Code: Select all
//step0010 exec proc1
Code: Select all
//proc1 proc
:
:
//stpr0080 exec sort
Code: Select all
//sortgwc proc
:
:
Understanding that usually one just codes something like the following to override a ddcard in the PROCLIB (proc1):
//procstep.ddcard override information
My goal is to override one or more ddcards in the 3rd level PROCLIB (sort).
So, do I code it like the following in the JCLLIB (job1) following the execution stmnt of the PROCLIB (proc1):
//proc1step.ddcard dd "override statement"
or
//proc1step.sortproc.ddcard dd "override statement"
or
//sortproc.proc1step.ddcard dd "override statement"
[/code]
I'm pretty sure I will get it explained correctly soon. I hope it is with this post so I don't aggrevate you or anyone else, futher.
Thanks!
Scott M
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page