copy an entire PDS

JES2/3, JCL, utilities.
Previous topicNext topic

Topic author
peeterjoot
Registered Member
Posts: 15
Joined: Fri Mar 03, 2017 2:01 am

copy an entire PDS

Post by peeterjoot » Thu Sep 28, 2017 3:30 am

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.
Last edited by Anuj Dhawan on Thu Sep 28, 2017 8:20 pm, edited 2 times in total.
Reason: Added code tags




enrico-sorichetti
Global Moderator
Global Moderator
Posts: 836
Joined: Wed Sep 11, 2013 3:57 pm

Re: copy an entire PDS

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



cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)


Topic author
peeterjoot
Registered Member
Posts: 15
Joined: Fri Mar 03, 2017 2:01 am

Re: copy an entire PDS

Post by peeterjoot » 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.



User avatar

Anuj Dhawan
Founder
Posts: 2418
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India

Re: copy an entire PDS

Post by Anuj Dhawan » Tue Oct 03, 2017 12:15 pm

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?


Thanks,
Anuj


enrico-sorichetti
Global Moderator
Global Moderator
Posts: 836
Joined: Wed Sep 11, 2013 3:57 pm

Re: copy an entire PDS

Post by enrico-sorichetti » Tue Oct 03, 2017 12:42 pm

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-)


cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)

Previous topicNext topic

Return to “JCL - Job Control Language.”