Would this approach work ?

1) put the new lines in a PDS member (member name TWOLINES, perhaps ?)
2) put Jon's JCL in a proc (instream would suffice):

   //ADDLINES PROC M=
   //STEP1    EXEC PGM=IEBGENER
   //SYSUT1   DD   DSN=libtoupdate(&M),DISP=OLD
   //         DD   DSN=otherlib(TWOLINES),DISP=SHR
   //SYSUT2   DD   DSN=libtoupdate(&M),DISP=OLD
   //SYSIN    DD   DUMMY
   //SYSPRINT DD   DUMMY
   //         PEND
3) use REXX to :
   >> pull the list of members (via the LISTDS function)

THEPDS = "'libtoupdate'"
X = OUTTRAP('ML.')               
"LISTDS "THEPDS" MEMBERS"        
X = OUTTRAP('OFF')               
DO N = 7 TO ML.0                 
  PARSE VAR ML.N MEMBER          
  MEMBER=STRIP(MEMBER)
  (code to write the following line to a dataset)           

   //COPY  EXEC ADDLINES,M=membername


Stan Haynes
Canada Revenue Agency
(613) 941-8091


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Veilleux, Jon L
Sent: February 14, 2011 12:49 PM
To: [email protected]
Subject: Re: Adding Lines to End of Member

Not very pretty....

//COPSTEP EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=my.pds(MEMBERNAME)
//       DD *
         Some kind of junk
        More junk
//SYSUDUMP DD SYSOUT=*
//SYSUT2 DD DISP=(SHR),DSN= my.pds(MEMBERNAME)


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Adam Johanson
Sent: Monday, February 14, 2011 12:04 PM
To: [email protected]
Subject: Adding Lines to End of Member

I've got to change about 1,000 members of a PDS containing JCL by adding
2 lines to the end of each member.

   I thought there might be a way to do this with IEBUPDTE, but he requires 
sequence numbers, which a lot of the members don't have. And it also looks like 
you can't just tell him something like, "sequence number = last".

   Is there any way to do this with another utility? I'd like to do this with 
standard MVS utilities, but if it winds up that we need to use a REXX program 
to do it, then we can go that route.

   Thanks.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html
This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to