//STOP01 EXEC PGM=MFDBUJCL,PARM='/STO DB BNKTXN' //SYSOUT DD SYSOUT=* //STOP02 EXEC PGM=MFDBUJCL,PARM='/STO DB BNKCUST' //SYSOUT DD SYSOUT=* //STOP03 EXEC PGM=MFDBUJCL,PARM='/STO DB BNKACC' //SYSOUT DD SYSOUT=*
//IC EXEC PGM=MFDBUJCL,PARM='IMAGECOPY,VERIFY'
//BNKIC1 DD DSN=BNKTXN.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC2 DD DSN=BNKTXNX1.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC3 DD DSN=BNKCUST.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC4 DD DSN=BNKACC.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC5 DD DSN=BNKTXNX2.IC.GDG(+1),DISP=(NEW,CATLG)
//SYSIN DD * BNKTXN BNKIC1 BNKTXNX1 BNKIC2 BNKCUST BNKIC3 BNKACC BNKIC4 BNKTXNX2 BNKIC5
The following is a complete example of the JCL required to execute the Image Copy utility. It specifies that five databases, defined in the first eight bytes of SYSIN data, are to be copied to locations specified by the DD statements. Also, since the VERIFY parameter has been specified, an attempt is made to verify the integrity of the databases:
//RUNGDG JOB 'IC',CLASS=A,MSGCLASS=A //* //STOP01 EXEC PGM=MFDBUJCL,PARM='/STO DB BNKTXN' //SYSOUT DD SYSOUT=* //STOP02 EXEC PGM=MFDBUJCL,PARM='/STO DB BNKCUST' //SYSOUT DD SYSOUT=* //STOP03 EXEC PGM=MFDBUJCL,PARM='/STO DB BNKACC' //SYSOUT DD SYSOUT=* //* //IC EXEC PGM=MFDBUJCL,PARM='IMAGECOPY,VERIFY' //* //SYSOUT DD SYSOUT=* //BNKIC1 DD DSN=BNKTXN.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC2 DD DSN=BNKTXNX1.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC3 DD DSN=BNKCUST.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC4 DD DSN=BNKACC.IC.GDG(+1),DISP=(NEW,CATLG) //BNKIC5 DD DSN=BNKTXNX2.IC.GDG(+1),DISP=(NEW,CATLG) //SYSIN DD * BNKTXN BNKIC1 BNKTXNX1 BNKIC2 BNKCUST BNKIC3 BNKACC BNKIC4 BNKTXNX2 BNKIC5 /* //* //START01 EXEC PGM=MFDBUJCL,PARM='/STA DB BNKTXN' //SYSOUT DD SYSOUT=* //START02 EXEC PGM=MFDBUJCL,PARM='/STA DB BNKCUST' //SYSOUT DD SYSOUT=* //START03 EXEC PGM=MFDBUJCL,PARM='/STA DB BNKACC' //SYSOUT DD SYSOUT=* //
If, for any reason, a database copy fails, the Image Copy utility creates an empty output dataset. In this case, you might want to delete the empty file before attempting to rerun the utility.