Page 1 of 1

Rename members while copy PDS.

Posted: Mon Sep 14, 2020 4:08 pm
by harish123
Hi,

How can I rename the PDS member names while copying one PDS to other?

Re: Rename members while copy PDS.

Posted: Mon Sep 14, 2020 7:29 pm
by Robert Sample
Since you did not specify how you are copying members from PDS to PDS, you made it very difficult to provide an accurate answer to you.

If you are using TSO ISPF to do the copy, either rename in the source PDS and then copy, or copy and then rename in the target PDS. There is probably a way to do the rename during the copy, but you can read the manual as well as I can.

If you are using IEBCOPY to do the copy, the SELECT MEMBER utility control statement allows you to rename members:

Code: Select all

SELECT M=(MEMBER1,(MEMBER2,NEWMEMB))
will copy MEMBER1 and MEMBER2, renaming MEMBER2 to NEWMEMB. The parentheses around the rename pair (old name, new name) are NOT optional.

Re: Rename members while copy PDS.

Posted: Sat Sep 19, 2020 11:45 am
by harish123
Thanks Robert. I was doing it using ISPF. Thanks for IEBCOPY, I never used that, will work with that.