Page 1 of 1

copy an entire PDS

Posted: Thu Sep 28, 2017 3:30 am
by peeterjoot
I see in the IDCAMS documentation that REPRO can only be used to copy a PDS member, and not the whole PDS.

Since I had a fairly small set of members in this case I used:

Code: Select all

//CREATEPO EXEC PGM=IEFBR14
//PDSDD    DD DISP=(NEW,CATLG),DSN=PJOOT.PDS,
//            SPACE=(TRK,(45,15,50)),
//            DCB=(RECFM=U,LRECL=80,BLKSIZE=4096,DSORG=PO)
//SYSPRINT DD SYSOUT=*
//SYSTERM  DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//***********************************************************************
//*
//* Create the PDS members
//*
//***********************************************************************
//STEP010I EXEC PGM=IEBCOPY
//VAMBYPAS DD DUMMY
//SYSPRINT DD SYSOUT=*
//INP0 DD DSN=WINKH.DR2383.STUBS.LOADLIB,DISP=SHR
//OUT0 DD DISP=SHR,DSN=PJOOT.PDS
//SYSIN DD *
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITA
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITB
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITC
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITD
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITE
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITF
   COPY OUTDD=OUT0,INDD=((INP0,R))
   SELECT MEMBER=PLITG
/*
... but surely there is a better way.

Re: copy an entire PDS

Posted: Thu Sep 28, 2017 3:37 am
by enrico-sorichetti

Re: copy an entire PDS

Posted: Tue Oct 03, 2017 5:01 am
by peeterjoot
fyi. All the calls to IEBCOPY that I'd seen specified a SELECT MEMBER clause in the command sequence. If that is omitted, the whole PDS is copied.

Re: copy an entire PDS

Posted: Tue Oct 03, 2017 12:15 pm
by Anuj Dhawan
peeterjoot wrote: Tue Oct 03, 2017 5:01 am fyi. All the calls to IEBCOPY that I'd seen specified a SELECT MEMBER clause in the command sequence. If that is omitted, the whole PDS is copied.
Pardon me, is there a question out there?

Re: copy an entire PDS

Posted: Tue Oct 03, 2017 12:42 pm
by enrico-sorichetti
FYFI, you asked how to copy an entire PDS and I pointed You to the relevant manuals which has examples on how to do it
without having to use any control statements
here is the link to the page, rathe than the whole manual
https://www.ibm.com/support/knowledgece ... .htm#u1045

to save You the click time here is the snippet

Code: Select all

  //COPY     JOB   ...
  //JOBSTEP  EXEC  PGM=IEBCOPY
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=DATASET5,UNIT=disk,VOL=SER=111113,
  //             DISP=SHR
  //SYSUT2   DD  DSNAME=DATASET4,UNIT=disk,VOL=SER=111112,
  //             DISP=(NEW,KEEP),SPACE=(TRK,(5,1,2))
so what are You complaining about :?:
All the calls to IEBCOPY that I'd seen
if that is really the case it would be wiser to consult an ophthalmologist for proper treatment 8-)