MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
naveen_kj Beginner Joined: 03 Feb 2003 Posts: 18 Topics: 8 Location: India
Posted: Tue Aug 19, 2003 9:21 am Post subject: Inserting line in members of a PDS
Hi,
I have a PDS with JCL's as members in it. I want to insert a line (JCL statement) at a particular line in all the members of the PDS.
Can anyone help me in doing it through a JCL?
Thanks in advance,
Naveen
Back to top
ofer71 Intermediate Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
Posted: Tue Aug 19, 2003 1:40 pm Post subject:
Hi
Here is my way of doing this:
First, prepare an Edit-Macro that looks like this:
Code: /* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
MYDATA = "Test Line "
ADDRESS ISREDIT "LINE_AFTER 5 = (MYDATA)"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
EXIT
The next step is runnimg a REXX like this:
Code: /* REXX */
MAC = 'TEMPMAC'
PDS = "MY.PDS"
X = OUTTRAP("LIBMEM.")
ADDRESS TSO "LISTDS "'PDS'" M"
X = OUTTRAP("OFF")
DO I = 7 TO LIBMEM.0
LIBMEM.I = STRIP(LIBMEM.I)
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")"
SAY 'MEMBER' LIBMEM.I 'CHANGED. RC='RC
END
EXIT
O.
________
List of products Last edited by ofer71 on Sat Feb 05, 2011 11:03 am; edited 1 time in total
Back to top
slade Intermediate Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
Posted: Wed Aug 20, 2003 1:39 am Post subject:
Hi Naveen,
If you have FileAid you can use this. I used it to insert a JCLLIB card behind every JOB card in the PDS.
Regards, Jack.
Code:
//JSLEIGIL JOB (888),'INSRTLN',CLASS=C,MSGCLASS=X,
// NOTIFY=JSLEIG
//*
//STEP01 EXEC PGM=FILEAID
//DD01 DD DISP=SHR,DSN=JSLEIG.BASE.Y2K.JCL
//NEWDSN DD DISP=SHR,DSN=JSLEIG.TEST.Y2K.TEST.JCL
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSIN DD *
$$DD01 USER F=JCL,WRITE=NEWDSN,
IF=(1,20,C' JOB '),
MOVE=(1,80C' '),
MOVE=(1,C'// JCLLIB ORDER=(PA.BASE.PROCLIB)'),
WRITE=NEWDSN
Back to top
naveen_kj Beginner Joined: 03 Feb 2003 Posts: 18 Topics: 8 Location: India
Posted: Wed Aug 20, 2003 10:22 am Post subject:
Jack/Ofer,
Thanks for the help,
Naveen
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum