Page 1 of 1

Can we copy a PDS to another PDS?

Posted: Mon Dec 05, 2022 5:15 pm
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?

Re: Can we copy a PDS to another PDS?

Posted: Sat Jan 14, 2023 8:22 pm
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.

Re: Can we copy a PDS to another PDS?

Posted: Mon Jan 16, 2023 11:28 pm
by RaGa
Yes, IEBCOPY can be used for PDS copy. But I use ISPF 3.3 more often.

Re: Can we copy a PDS to another PDS?

Posted: Tue Jan 17, 2023 12:50 am
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.

Re: Can we copy a PDS to another PDS?

Posted: Thu Jan 19, 2023 8:35 pm
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?

Re: Can we copy a PDS to another PDS?

Posted: Fri Jan 20, 2023 4:47 am
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.

Re: Can we copy a PDS to another PDS?

Posted: Wed Jan 25, 2023 11:02 am
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?

Re: Can we copy a PDS to another PDS?

Posted: Mon Feb 06, 2023 6:22 pm
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?