Page 1 of 1

How to copy members of pds to another pds

PostPosted: Wed May 04, 2011 3:48 pm
by Rekha_wipro
Hi,

I am trying to copy members from multiple PDS to one PDS, but could not do it.
I have used IEBCOPY, but with this utility we can copy only one PDS members to another PDS.

For Example:

PDS1: CRUD.BAT.PDS1 (contains 20 members)
PDS2: CRUD.ONL.PDS1 (contains 23 members)
PDS3: CRUD.CPY.PDS1 (contains 10 members)

Now I want to copy all the members from the above mentioned pds to one single pds.

Please suggest me to resolve this issue.

Thanks & Regards,
Rekha

Re: How to copy members of pds to another pds

PostPosted: Wed May 04, 2011 4:47 pm
by Robert Sample
//         EXEC PGM=IEBCOPY
//SYSPRINT DD   SYSOUT=*
//PDS1     DD   DISP=SHR,DSN=PDS1.DATA.SET.NAME
//PDS2     DD   DISP=SHR,DSN=PDS2.DATA.SET.NAME
//PDS3     DD   DISP=SHR,DSN=PDS3.DATA.SET.NAME
//PDSOUT   DD   DISP=OLD,DSN=OUTPUT.DATA.SET.NAME
//SYSIN    DD   *
  COPY OUT=PDSOUT,IN=((PDS1,R))
  COPY OUT=PDSOUT,IN=((PDS2,R))
  COPY OUT=PDSOUT,IN=((PDS3,R))
/*
What is so hard about this? And, by the way, when you say IEBCOPY will only copy one PDS to another in a job -- you are wrong.

Re: How to copy members of pds to another pds

PostPosted: Thu May 05, 2011 3:00 pm
by Rekha_wipro
Thanks for reply.
But I need to copy multiple pds on DASD to a single PDS on Tape.

Could you please help me out on this.

Thanks
Rekha

Re: How to copy members of pds to another pds

PostPosted: Thu May 05, 2011 3:24 pm
by NicC
Tape? You did not mention that before. You cannot store a pds on tape although you can back it up to tape so it would seem that you should take Robert's example and after that is run use the backup software of your choice to back the new PDS to tape.

Actually, I have never tried copying a PDS to tape but maybe it is possible - but you will not be able to use it as a PDS.

Re: How to copy members of pds to another pds

PostPosted: Thu May 05, 2011 4:00 pm
by Robert Sample
A PDS is stored on tape in unloaded sequential format. It cannot be used in any way as a PDS -- it MUST be restored to a disk PDS file before you can access any of the members. The JCL I previously provided could be used -- add a DD statement pointing to tape and a fourth COPY statement:
  COPY OUT=TAPEDD,IN=PDSOUT
You cannot, however, directly copy the three PDS files to a single tape file -- you could create three separate files on the tape but not a single file.