Example 8: Recovering using tape-stacked data sets
Tape stacking refers to copying several small table spaces or table space partitions to different data sets on one or more tape volumes. The advantage of tape stacking is that it reduces the number of tapes needed for your image copies.
BMC AMI Recover dynamically allocates the data set and the tape volumes and avoids excessive rewinding and positioning. You do not need to specify the data sets in the JCL.
Example 8A: Making stacked image copies
The JCL in the following figure makes one full image copy of each of three table spaces, registers them, and writes them to the same cartridge tape.
JCL for making stacked image copies
//AFREX08A JOB (PAFR),'EXAMPLE 8A',
// class="Q",NOTIFY=&SYSUID,
// MSGCLASS=X
//*
//ACPCOPY EXEC PGM=ACPMAIN,REGION=0M,
// PARM='DEJM,EXAMPLE8A,NEW/RESET'
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN DD *
OUTPUT STAKTAPE
UNIT CART
STACK YES
DSNAME &UID.&DB.&TS.D&DATE.T&TIME
MODELDCB SYS1.MODEL
COPY TABLESPACE BMCDBSMP.BMCTS001
FULL YES
COPYDDN(STAKTAPE)
COPY TABLESPACE BMCDBSMP.BMCTS002
FULL YES
COPYDDN(STAKTAPE)
COPY TABLESPACE BMCDBSMP.BMCTS003
FULL YES
COPYDDN(STAKTAPE)
/*
//SYSPRINT DD SYSOUT=*
//
// class="Q",NOTIFY=&SYSUID,
// MSGCLASS=X
//*
//ACPCOPY EXEC PGM=ACPMAIN,REGION=0M,
// PARM='DEJM,EXAMPLE8A,NEW/RESET'
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN DD *
OUTPUT STAKTAPE
UNIT CART
STACK YES
DSNAME &UID.&DB.&TS.D&DATE.T&TIME
MODELDCB SYS1.MODEL
COPY TABLESPACE BMCDBSMP.BMCTS001
FULL YES
COPYDDN(STAKTAPE)
COPY TABLESPACE BMCDBSMP.BMCTS002
FULL YES
COPYDDN(STAKTAPE)
COPY TABLESPACE BMCDBSMP.BMCTS003
FULL YES
COPYDDN(STAKTAPE)
/*
//SYSPRINT DD SYSOUT=*
//
Example 8B: Recovering with stacked image copies
The JCL in the following figure performs a recovery using the three image copies.
JCL for recovering with stacked cataloged image copies as input
//AFREX08B JOB (PAFR),'EXAMPLE 8B',
// class="Q",NOTIFY=&SYSUID,
// MSGCLASS=X
//*
//RECOVER EXEC PGM=AFRMAIN,REGION=5M,
// PARM='DEJM,EXAMPLE8B,NEW/RESTART,MSGLEVEL(2)'
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN DD *
RECOVER TABLESPACE BMCDBSMP.BMCTS001 TOCOPY LASTCOPY
RECOVER TABLESPACE BMCDBSMP.BMCTS002 TOCOPY LASTCOPY
RECOVER TABLESPACE BMCDBSMP.BMCTS003 TOCOPY LASTCOPY
/*
//SYSPICK DD SYSOUT=*
//
// class="Q",NOTIFY=&SYSUID,
// MSGCLASS=X
//*
//RECOVER EXEC PGM=AFRMAIN,REGION=5M,
// PARM='DEJM,EXAMPLE8B,NEW/RESTART,MSGLEVEL(2)'
//STEPLIB DD DISP=SHR,DSN=product.libraries
// DD DISP=SHR,DSN=DB2.DSNEXIT
// DD DISP=SHR,DSN=DB2.DSNLOAD
//SYSIN DD *
RECOVER TABLESPACE BMCDBSMP.BMCTS001 TOCOPY LASTCOPY
RECOVER TABLESPACE BMCDBSMP.BMCTS002 TOCOPY LASTCOPY
RECOVER TABLESPACE BMCDBSMP.BMCTS003 TOCOPY LASTCOPY
/*
//SYSPICK DD SYSOUT=*
//
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*