copy selective members from muliple pds to one pds using jcl

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
shanu kumari
Member
Posts: 2
Joined: Fri Sep 18, 2015 2:42 pm

copy selective members from muliple pds to one pds using jcl

Post by shanu kumari » Fri Sep 18, 2015 2:46 pm

I want to copy selective members from muliple pds to one pds using jcl code as :

shanu.pds has 1000 members
anshul.pds has 1000 members

I want few members from shanu.pds and few from anshul.pds in a new pds

Thanks in advance to help me.
Pleaee help me :)

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Fri Sep 18, 2015 4:41 pm

IEBCOPY

shanu kumari
Member
Posts: 2
Joined: Fri Sep 18, 2015 2:42 pm

Post by shanu kumari » Fri Sep 18, 2015 6:41 pm

my job card
//STEP01 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//PDS1 DD DISP=SHR,DSN=a.pds
//PDS2 DD DISP=SHR,DSN=b.pds
//PDS2 DD DISP=SHR,DSN=c.pds
//PDSOUT DD DSN=d.pds
// SPACE=(CYL,(500,500,3000),RLSE),
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,DSORG=PO)
//SYSIN DD *
COPY OUTDD=PDSOUT,INDD=((PDS1,R))
COPY OUTDD=PDSOUT,INDD=((PDS2,R))
/*
//STEP02 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//DDIN DD DSN=d.pds,DISP=SHR
//DDOUT DD DSN=final.pds,SPACE=(TRK,(1,1,1),RLSE),
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,DSORG=PO)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
COPY OUTDD=DDOUT,INDD=DDIN
SELECT MEMBER=(E0015AUE,E0015AXL)
/*



I have tried in this way this is working fine but i have a query that may i do this without merging a.pds, b.pds and c.pds.Can't i directly copy members from multiple input pds to single output pds.

thank you and please reply

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others