How do I copy multiple members from one Master file to another Master file with all archive levels and replace what is there?
search cancel

How do I copy multiple members from one Master file to another Master file with all archive levels and replace what is there?

book

Article ID: 11257

calendar_today

Updated On:

Products

Librarian

Issue/Introduction



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.

Environment

Release: LIB-AM00200-4.4-CA-Librarian-Access Method
Component:

Resolution

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