View previous topic :: View next topic
|
Author |
Message |
rebull
New User

Joined: 20 Dec 2020 Posts: 3 Location: US
|
|
|
|
Hi!
I have the need of modify the same line or insert the same change on 20 JCLs at the same time, is that possible?
Example
Library:
WORK.JCLS.DESTINO.LIB(JCLMOD01)
WORK.JCLS.DESTINO.LIB(JCLMOD02)
WORK.JCLS.DESTINO.LIB(JCLMOD03)
Let's say I have into the JCLs the following lines,
JCLMOD01
Code: |
EDIT WORK.JCLS.DESTINO.LIB(JCLMOD01) - 01.03 Columns 00001 00072
Command ===> Scroll ===> CSR
000312 //*
000313 //RESUME EXEC PGM=SORT,COND=(04,LT)
000314 //SYSOUT DD SYSOUT=*
000315 //SORTIN DD DSN=WORK.JCLS.INSERTX.SORTOUT,DISP=SHR
000316 // DD DSN=WORK.JCLS.CHGRECX.SORTOUT,DISP=SHR
000319 //DELTA DD DSN=WORK.JCLS.RESUME.DELTA.D%%ODATE,
000320 // DISP=(,CATLG,DELETE),
000321 // SPACE=(TRK,(150,150),RLSE)
000322 //SYSIN DD *
000323 SORT FIELDS=COPY
000324 OUTFIL FNAMES=DELTA
000325 //*
|
JCLMOD02
Code: |
EDIT WORK.JCLS.DESTINO.LIB(JCLMOD02) - 01.03 Columns 00001 00072
Command ===> Scroll ===> CSR
000312 //*
000313 //RESUME EXEC PGM=SORT,COND=(04,LT)
000314 //SYSOUT DD SYSOUT=*
000315 //SORTIN DD DSN=WORK.JCLS.INSERTX.SORTOUT,DISP=SHR
000316 // DD DSN=WORK.JCLS.CHGRECX.SORTOUT,DISP=SHR
000319 //DELTA DD DSN=WORK.JCLS.RESUME.DELTA.D%%ODATE,
000320 // DISP=(,CATLG,DELETE),
000321 // SPACE=(TRK,(150,150),RLSE)
000322 //SYSIN DD *
000323 SORT FIELDS=COPY
000324 OUTFIL FNAMES=DELTA
000325 //*
|
JCLMOD03
Code: |
EDIT WORK.JCLS.DESTINO.LIB(JCLMOD03) - 01.03 Columns 00001 00072
Command ===> Scroll ===> CSR
000312 //*
000313 //RESUME EXEC PGM=SORT,COND=(04,LT)
000314 //SYSOUT DD SYSOUT=*
000315 //SORTIN DD DSN=WORK.JCLS.INSERTX.SORTOUT,DISP=SHR
000316 // DD DSN=WORK.JCLS.CHGRECX.SORTOUT,DISP=SHR
000319 //DELTA DD DSN=WORK.JCLS.RESUME.DELTA.D%%ODATE,
000320 // DISP=(,CATLG,DELETE),
000321 // SPACE=(TRK,(150,150),RLSE)
000322 //SYSIN DD *
000323 SORT FIELDS=COPY
000324 OUTFIL FNAMES=DELTA
000325 //*
|
As we can see in the 3 JCLs we have the same lines
Now let's say I want to introduce the same lines into all the 3 JCLs, how can I do that at the same time?
JCLMOD0*
Code: |
EDIT WORK.JCLS.DESTINO.LIB(JCLMOD0*) - 01.03 Columns 00001 00072
Command ===> Scroll ===> CSR
000312 //*
000313 //RESUME EXEC PGM=SORT,COND=(04,LT)
000314 //SYSOUT DD SYSOUT=*
000315 //SORTIN DD DSN=WORK.JCLS.INSERTX.SORTOUT,DISP=SHR
000316 // DD DSN=WORK.JCLS.CHGRECX.SORTOUT,DISP=SHR
000319 //DELTA DD DSN=WORK.JCLS.RESUME.DELTA.D%%ODATE,
000320 // DISP=(,CATLG,DELETE),
000321 // SPACE=(TRK,(150,150),RLSE)
000322 //SYSIN DD *
000323 SORT FIELDS=COPY
000324 OUTFIL FNAMES=DELTA
000325 //*
/*
//* NEW LINES TO BE ADDED
//CONTA EXEC PGM=SORT,COND=(4,LT)
//SORTIN DD DSN=WORK.JCLS.RESUME.DELTA.D%%ODATE,DISP=SHR
//SORTOUT DD DSN=WORK.JCLS.RESUME.CONTA.SORTOUT,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(20,5),RLSE),
// DCB=(LRECL=80,BLKSIZE=0)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT,
TRAILER1=(01:' %%JOBNAME %%ODATE DELTA COUNT: ', -
COUNT=(M11,LENGTH=8)),NODETAIL
//*
|
thank you so much in advance for your time |
|
Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
You could have done it using cut and paste in less time than it took you to write the post and even less time if you used the JCL INCLUDE statement. And, for 20 members, cut and paste is probably the quickest way, anyway. |
|
Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 745 Location: Denmark
|
|
|
|
You can't. I go with Nic, use cut and paste.
However, looking a your JCL I see datasetname with D%%ODATE, which leads me to believe that those members are base for generated JCL. IBM Tivoli Workload Scheduler? Do the JCL generator have an INCLUDE feature? |
|
Back to top |
|
 |
rebull
New User

Joined: 20 Dec 2020 Posts: 3 Location: US
|
|
|
|
thank you for your replies, like I imagine cut and paste several times it's the only option.
sorry what do you mean with Include? |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2209 Location: USA
|
|
|
|
rebull wrote: |
thank you for your replies, like I imagine cut and paste several times it's the only option.
sorry what do you mean with Include? |
RTFM: “JCL Manual. INCLUDE statement” |
|
Back to top |
|
 |
rebull
New User

Joined: 20 Dec 2020 Posts: 3 Location: US
|
|
|
|
sergeyken wrote: |
rebull wrote: |
thank you for your replies, like I imagine cut and paste several times it's the only option.
sorry what do you mean with Include? |
RTFM: “JCL Manual. INCLUDE statement” |
oh, you're right I understand now.
thank you for your hep |
|
Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 745 Location: Denmark
|
|
|
|
Actually I meant Tivoli Scheduler, I'm pretty sure it has an include feature. The JCL INCLUDE, or private procedure libraries, was already mentioned by Nic. |
|
Back to top |
|
 |
|
|