Image Copy Utility

Describes the functions of the Image Copy utility and the JCL required to run it.
The Image Copy utility copies all specified databases from their current location as defined by the ES_IMSDAT environment variable to a specified backup location. This is done using JCL that includes the following:
  • One STOP statement to stop each database you want to back up. All databases must be stopped before the Image Copy utility can back them up. For example:
    //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=*
  • A JCL step to execute the Image Copy utility, IMAGECOPY. Optionally, you can also specify the VERIFY parameter to verify the contents of all copied databases. If a database is found to be corrupt, no copy is made. In this case, correct the problem by rebuilding the database before attempting to make another backup. The following example shows the VERIFY parameter in use:
    //IC       EXEC PGM=MFDBUJCL,PARM='IMAGECOPY,VERIFY'
  • Specify the name and location of each backed up database. The following example specifies that the copied databases be stored as GDGs, enabling you to keep multiple versions of the data:
    //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)
  • In the SYSIN statement, list each database you want to copy followed by the name of the DD that represents the location of the backed up database. Place the database name in the first eight columns. For example:
    //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.

Important: Do not use any Micro Focus utilities on the backup image of a database before attempting to use the database image copy for recovery. If you alter the database image copy in any way, this causes the Recovery utility to fail.