Page 1 of 1

copy selective members from muliple pds to one pds using jcl

Posted: Fri Sep 18, 2015 2:46 pm
by shanu kumari
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 :)

Posted: Fri Sep 18, 2015 4:41 pm
by William Collins
IEBCOPY

Posted: Fri Sep 18, 2015 6:41 pm
by shanu kumari
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