Can we copy a PDS to another PDS?
Can we copy a PDS to another PDS?
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?
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?
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Can we copy a PDS to another PDS?
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.
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.
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,
//*
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.
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.
Re: Can we copy a PDS to another PDS?
Yes, IEBCOPY can be used for PDS copy. But I use ISPF 3.3 more often.
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Can we copy a PDS to another PDS?
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.
-
- Registered Member
- Posts: 18
- Joined: Sat Sep 27, 2014 9:13 pm
Re: Can we copy a PDS to another PDS?
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?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.
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Can we copy a PDS to another PDS?
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?
Thanks everyone for participating. This discussion really helps me.
Are there more situation for this:
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?
-
- Registered Member
- Posts: 18
- Joined: Sat Sep 27, 2014 9:13 pm
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