Need to copy some members from one Master file to another Master file and the members already exist on the TO Master file. I also want to copy all archive levels.
Using the JCL below, specify the member names you need to copy in the -COPY command with the REP option:
//STEP1 EXEC PGM=AFOLIBR,PARM='NRJS,NJTA' //OSJOB DD DSN=&&UTIL,DISP=(,PASS),UNIT=SYSDA, // SPACE=(CYL,(1,1)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000) //SYSPRINT DD SYSOUT=* //LIST DD SYSOUT=* //INDEX DD SYSOUT=* //MASTER DD DSN=from.master.file,DISP=SHR //SYSIN DD * -OPT UTILITY -COPY MBR1,REP
-COPY MBR2,REP
-COPY MBR3,REP -END //STEP2 EXEC PGM=AFOLIBR,PARM='NRJS,NJTA' //OSJOB DD DUMMY //SYSPRINT DD SYSOUT=* //LIST DD SYSOUT=* //INDEX DD SYSOUT=* //MASTER DD DSN=to.master.file,DISP=SHR //SYSIN DD DSN=&&UTI,DISP=(OLD,PASS) /*