> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:[email protected]] On Behalf Of Adam Johanson
> Sent: Monday, February 14, 2011 11:04 AM
> 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.
You do realize that this really means rewriting all 1,000 members. If it were
me, I'd likely use ISPF in batch to do it. Use the LM... dialog to get member
names, the EDIT each member with an IMACRO which adds the lines and SAVEs the
member.
If you are very adventurous and have Dovetailed Technologies' "dspipes"
installed on your system. And you don't mind using UNIX, I can give you a weird
UNIX shell script. My example places the output into a separate PDS for safety.
pdsdir "input.pds" | \
awk '{print $1;}' |\
while read name;do ;
fromdsn "input.pds($name)"| \
(cat;echo 'extra line 1';echo 'extra line 2')| \
todsn "output.pds($name)"
done
You might also be able to use "cp" in place of "fromdsn" and "todsn". But I
can't find a good replacement for "pdsdir" for getting the names of the members
in the pds.
--
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone *
[email protected] * www.HealthMarkets.com
Confidentiality Notice: This e-mail message may contain confidential or
proprietary information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message.
HealthMarkets(r) is the brand name for products underwritten and issued by the
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The
MEGA Life and Health Insurance Company.SM
----------------------------------------------------------------------
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