I want to create a job (JCL) to copy 100 PDS members into a temp PDS daily and then rename the prefix of the 100 members in the temp PDS.
For Example:
PDS 1
PDS.AAAA.member(XXmem1, XXmem2......XXmem100)
Copy to
PDS 2
PDS.BBB.member(YYmem1, YYmem2....YYmem100)
I know I can use IEBCOPY to copy 100 members from PDS.AAA.member to PDS.BBB.member. But how to globally change all prefix from XX to YY for all 100 members? So it will be XXmem1 to YYmem1...and so on.
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
You can do this using REXX.
-Read all the members of the PDS in a stem variable
-Read one member at a time and copy it to a diff PDS with a new member name
- Keep repeating this till the last member
i tried this with the below control statement .... but its giving error that
"REQUIRED VOLUME COULD NOT BE MOUNTED ... UNUSUAL END"
Code:
//SYSIN DD *
RENAME DSNAME=TEST.SYAM.JOBSNAP,VOL=SER=D21219, X
NEWNAME=TEST.SYAM.JOBSNAP1
/*
Code:
RENAME DSNAME=TEST.SYAM.JOBSNAP,VOL=SER=D21219, X
NEWNAME=TEST.SYAM.JOBSNAP1
IEH210I YOUR REQUEST CANNOT BE SERVICED....
IEH211I REQUIRED VOLUME COULD NOT BE MOUNTED ... UNUSUAL END