How to copy members of pds to another pds

Help for IBM's record-oriented filesystem VSAM, ESDS, KSDS, RRDS, LDS and Storage management Subsystems
Rekha_wipro
Posts: 2
Joined: Wed May 04, 2011 3:38 pm
Skillset: Mainframe
Referer: Through Friends

How to copy members of pds to another pds

Postby Rekha_wipro » Wed May 04, 2011 3:48 pm

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

Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: How to copy members of pds to another pds

Postby Robert Sample » Wed May 04, 2011 4:47 pm

Code: Select all

//         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.

Rekha_wipro
Posts: 2
Joined: Wed May 04, 2011 3:38 pm
Skillset: Mainframe
Referer: Through Friends

Re: How to copy members of pds to another pds

Postby Rekha_wipro » Thu May 05, 2011 3:00 pm

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

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: How to copy members of pds to another pds

Postby NicC » Thu May 05, 2011 3:24 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: How to copy members of pds to another pds

Postby Robert Sample » Thu May 05, 2011 4:00 pm

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:

Code: Select all

  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.


  • Similar Topics
    Replies
    Views
    Last post