Hi,
I'm trying to do the following.
1. Copy the JCL from one PDS to other PDS.
2. Skip/delete the below lines when you copy over.
// DD DSN=TEST.DHL.RR46916,
// DISP=SHR
// DD DSN=TEST.DHL.RR46919,
// DISP=SHR
// DD DSN=TEST.DHL.RR46927,
// DISP=SHR
// DD DSN=TEST.DHL.RR46928,
// DISP=SHR
3. Replace the last two digits of the first DSN in the SORTIN DD of STEP10, using a symbolic parameter.
Letz say the symbolic parameter has a value 18.
Before change:
//SORTIN DD DSN=TEST.DHL.RR46903,
// DISP=SHR
After Change:
//SORTIN DD DSN=TEST.DHL.RR46918,
// DISP=SHR
Hi,
Thanks for looking into it. Yes, its always those lines(Unless there is a change in the JCL, which i hope wont be too often. )
I was thinking about doing that in two steps. Copy line 1 to 5 to a temp dataset 1 and line 14 to end to a temp dataset 2 and then concatenate both.
But i was looking for achieving it in single step. (I have to copy 50 similar JCLs. So if one takes 2 steps, then i have to code 100 steps for copying 50 JCLs. So tryinng to see if i could do that in one step.)
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
If the line-numbers will always be the same, you can append a sequence number temporarily and use OUTFIL OMIT= to get rid of the lines you don't want, and then BUILD to remove the temporary extension.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Code:
BUILD=(1,72,80:X)
That has your position one for a length of 72, puts a blank in position 80, and space-fills any intervening bytes. (1,72,8X), putting in eight blanks directly, would be the same.
You could also OVERLAY starting at 81. However, since you don't need the existing line-number data from the PDS member, you may as well re-use and then blank.
Try to use the Code tags when posting, to preserve spacing.