MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inserting line in members of a PDS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
naveen_kj
Beginner


Joined: 03 Feb 2003
Posts: 18
Topics: 8
Location: India

PostPosted: Tue Aug 19, 2003 9:21 am    Post subject: Inserting line in members of a PDS Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Aug 19, 2003 1:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Wed Aug 20, 2003 1:39 am    Post subject: Reply with quote

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
View user's profile Send private message
naveen_kj
Beginner


Joined: 03 Feb 2003
Posts: 18
Topics: 8
Location: India

PostPosted: Wed Aug 20, 2003 10:22 am    Post subject: Reply with quote

Jack/Ofer,

Thanks for the help,

Naveen
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group