Can we copy a PDS to another PDS?

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
S Vikram
New Member
Posts: 8
Joined: Mon Jan 05, 2015 2:22 pm

Can we copy a PDS to another PDS?

Post by S Vikram »

Hi,

I was asked to write the statements to copy a given PDS to another PDS, which I could not reply. Based on some research I think IEBCOPY can be used for this.

Is this correct? Please advise.

2nd question I have it why would in a practical world I would ever need to copy one PDS to other, other than taking a back-up of my own PDS? Is there any other use case?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Can we copy a PDS to another PDS?

Post by Anuj Dhawan »

That's correct - IEBCOPY can be used to copy PDS. IEBCOPY is a data set utility that is used to copy or merge members between one or more partitioned data sets, or partitioned data sets extended (PDSEs), in full or in part.

Code: Select all

//COPYJOBA JOB,'COPY PDS',MSGCLASS=X
//         EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD DISP=SHR,DSN=ABCD.LIB.SOURCE
//SYSUT2   DD DISP=(NEW,KEEP),UNIT=DASD,DSN=ABCD.SOURCE,
//*
There are many situations when you'd want to COPY a given PDS(e) to another. One example, as you said is taking back-up. The ISPF copy options (option 3.3, among others) uses IEBCOPY "under the covers." Moving a PDS or PDSE from one volume to another is easily done with IEBCOPY as well.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
RaGa
New Member
Posts: 7
Joined: Wed Sep 09, 2015 9:52 am

Re: Can we copy a PDS to another PDS?

Post by RaGa »

Yes, IEBCOPY can be used for PDS copy. But I use ISPF 3.3 more often.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we copy a PDS to another PDS?

Post by Robert Sample »

If you are still using PDS you could run out of directory blocks when adding members to the PDS. If this happens, and you don't have a recovery utility like PDS86, you will have no choice but to copy the PDS to a new PDS with a larger directory. PDSE don't run out of directory blocks, so one common use of IEBCOPY is to copy PDS to PDSE.
Richa Chauhan
Registered Member
Posts: 18
Joined: Sat Sep 27, 2014 9:13 pm

Re: Can we copy a PDS to another PDS?

Post by Richa Chauhan »

Robert Sample wrote: Tue Jan 17, 2023 12:50 am If you are still using PDS you could run out of directory blocks when adding members to the PDS. If this happens, and you don't have a recovery utility like PDS86, you will have no choice but to copy the PDS to a new PDS with a larger directory. PDSE don't run out of directory blocks, so one common use of IEBCOPY is to copy PDS to PDSE.
I am at a company where they still use a lot of PDS for libraries. It's an old compnay. Are PDS not good enough?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we copy a PDS to another PDS?

Post by Robert Sample »

PDS are still a perfectly acceptable way to access members in a data set. However, PDSE was developed by IBM to overcome the limitations of PDS -- such as the requirement to compress the PDS to recover space when members are updated, and the pre-allocated directory. I haven't heard of any push by IBM to remove PDS so it will continue to be supported for the foreseeable future.
S Vikram
New Member
Posts: 8
Joined: Mon Jan 05, 2015 2:22 pm

Re: Can we copy a PDS to another PDS?

Post by S Vikram »

Thanks everyone for participating. This discussion really helps me.

Are there more situation for this:
2nd question I have it why would in a practical world I would ever need to copy one PDS to other, other than taking a back-up of my own PDS? Is there any other use case?
Richa Chauhan
Registered Member
Posts: 18
Joined: Sat Sep 27, 2014 9:13 pm

Re: Can we copy a PDS to another PDS?

Post by Richa Chauhan »

RaGa wrote: Mon Jan 16, 2023 11:28 pm Yes, IEBCOPY can be used for PDS copy. But I use ISPF 3.3 more often.
Does 3.3 alos calls IEBCOPY?
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”