copy an entire PDS

JES2/3, JCL, utilities.
Post Reply
peeterjoot
Registered Member
Posts: 15
Joined: Fri Mar 03, 2017 2:01 am
Contact:

copy an entire PDS

Post 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.
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: 837
Joined: Wed Sep 11, 2013 3:57 pm

Re: copy an entire PDS

Post by enrico-sorichetti »

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-)
peeterjoot
Registered Member
Posts: 15
Joined: Fri Mar 03, 2017 2:01 am
Contact:

Re: copy an entire PDS

Post 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.
User avatar
Anuj Dhawan
Founder
Posts: 2816
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: copy an entire PDS

Post 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?
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.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 837
Joined: Wed Sep 11, 2013 3:57 pm

Re: copy an entire PDS

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

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

Register

Sign in

Return to “JCL - Job Control Language.”