This section gives an example of using the file copy notification service to register a backup to CICS® VR, then restoring the backup with a restore skeleton.
This sample recovery scenario uses backups created by IDCAMS REPRO, but it can also be applied to other backup products. This example performs the following steps:
Below is a sample job that creates a backup of a VSAM data set, then registers the backup in the CICS VR RCDS.
//TESTNTFY JOB ,CICSVR,MSGLEVEL=(1,1),MSGCLASS=H,REGION=6144K
//*-------------------------------------------------------------------*/
//* CREATE BACKUP USING REPRO */
//*-------------------------------------------------------------------*/
//BACKUP EXEC PGM=IDCAMS
//IN DD DSN=AAAAAAAA.BBBBBBBB.CCCCCCCC,DISP=OLD
//OUT DD DSN=AAAAAAAA.BBBBBBBB.CCCCCCCC.BACKUP,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IN)
OUTFILE(OUT)
/*
//*------ -----------------------------------------------------------------*/
//* RUN NOTIFY UTILITY */
//*------------------------------------------------------------------------*/
//REGISTER EXEC PGM=DWWNT
//STEPLIB DD DSNAME=DWW.CICSVR42.SDWWLOAD,DISP=SHR
// DD DSNAME=DWW.CICSVR42.SDWWLENU,DISP=SHR
//DWWMSG DD SYSOUT=*
//DWWPRINT DD SYSOUT=*
//DWWIN DD *
NOTIFY DSNAME(AAAAAAAA.BBBBBBBB.CCCCCCCC) -
BACKUPNAME(AAAAAAAA.BBBBBBBB.CCCCCCCC.BACKUP) -
PRODUCT(REPRO)
//
After performing steps one and two listed above, the backup is now registered in the CICS VR RCDS. Therefore, you can use the CICS VR panel interface to build a job that restores the VSAM data set from the registered backup, then performs a forward recovery on the restored VSAM data set.
As previously mentioned, a restore skeleton must be defined to CICS VR for every different backup type that is registered to CICS VR through the file copy notification service. In this example, all backups that are registered to CICS VR by calling the NOTIFY program is registered with the REPRO product identifier. Therefore, a restore skeleton named DWWREPRO must also be defined to CICS VR. A sample DWWREPRO restore skeleton is included with CICS VR in the SDWWSENU library.
)CM*******************************************************************/
)CM */
)CM @BANNER_START */
)CM Licensed Materials - Property of IBM */
)CM */
)CM 5655-Y24 */
)CM */
)CM (C) Copyright IBM Corp. 2012 */
)CM @BANNER_END */
)CM */
)CM*******************************************************************/
)CM
)CM This skeleton can be used to restore a VSAM cluster from
)CM a backup data set created by IDCAMS REPRO.
)CM
)CM This skeleton performs an IDCAMS REPRO of the backup data set
)CM into the target data set. This skeleton does not create the target
)CM data set. Therefore, the target data set must exist and be
)CM cataloged prior to using this skeleton.
)CM
)CM If specific volume, unit, and sequence number information was
)CM specified for the backup during notification (for example, if
)CM the backup is not cataloged and/or resides on tape ), CICSVR
)CM retrieves it from the RCDS and add it to the INFILE DD statement.
)CM
)CM The following variables are used in this skeleton. However,
)CM values for some of the listed variables might not be available if
)CM they were not specified during notification of the backup.
)CM This skeleton contains logic to check for the existence of values
)CM before including the associated variable into the produced JCL.
)CM
)CM &CBUDSN - Backup data set name
)CM &CTODSN - Data set name that is used for restore
)CM and recovery
)CM &CBVOLNUM - Number of volumes the backup resides on.
)CM This variable contains a value of 0 if
)CM no volume information was specified during
)CM notification.
)CM &CBUNIT - Device type of the volume(s) that the backup
)CM resides on (if specified during notification)
)CM &CBSEQNUM - Sequence number of a backup that resides on tape
)CM (if specified during notification)
)CM &CBVOLTBL - Name of the ISPF table that contains the volumes
)CM that the backup resides on
)CM &CBVOL - Variable to extract each volume name entry from the
)CM &CBVOLTBL table
)CM
)CM*******************************************************************/
//*
//RES00&J EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INFILE DD DISP=SHR,
)SEL &CBVOLNUM GT 0
// UNIT=&CBUNIT,
)SEL &CBSEQNUM NE &Z
// LABEL=&CBSEQNUM,
)ENDSEL
)SET I = 1
)DOT &CBVOLTBL
)SEL &CBVOLNUM EQ 1
// VOLUME=SER=&CBVOL.,
)ENDSEL
)SEL &CBVOLNUM GT 1
)SEL &I NE 1 && &I NE &CBVOLNUM
// &CBVOL.,
)ENDSEL
)SEL &I EQ 1
// VOLUME=SER=(&CBVOL.,
)ENDSEL
)SEL &I EQ &CBVOLNUM
// &CBVOL.),
)ENDSEL
)SET I = &I + 1
)ENDSEL
)ENDDOT
)ENDSEL
// DSN=&CBUDSN
//SYSIN DD *
REPRO -
INFILE(INFILE) -
OUTDATASET(&CTODSN.)
/*
The DWWREPRO restore skeleton supplied by CICS VR performs the following:
If the CICS VR panels are called, and a backup that was registered using this example is selected for restore, CICS VR uses the DWWREPRO restore skeleton and produces a recovery job similar to:
//RECOVER JOB NOTIFY=&SYSUID
//DWW PROC
//RECOVER EXEC PGM=DWWCO
//STEPLIB DD DSN=DWW.SDWWLOAD,DISP=SHR
// DD DSN=DWW.SDWWLENU,DISP=SHR
//DWWMSG DD SYSOUT=*
//DWWPRINT DD SYSOUT=*
//DWWCON1 DD DSN=DWW.DWWCON1.GRPPROD,DISP=SHR
//DWWCON2 DD DSN=DWW.DWWCON2.GRPPROD,DISP=SHR
//DWWCON3 DD DSN=DWW.DWWCON3.GRPPROD,DISP=SHR
// PEND
//* END OF PROC
//*
//RES001 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INFILE DD DISP=SHR,
// DSN=PAYROLL.BACKUP.BASE
//SYSIN DD *
REPRO -
INFILE(INFILE) -
OUTDATASET(PAYROLL.RESTORE.BASE)
/*
//DWW001 EXEC DWW
//DWWIN DD *
RECOVER -
ONLY -
NEWSPHERE(PAYROLL.RESTORE.BASE) -
APPLYCA -
STARTTIME(05.041/12:47:35) -
STOPTIME(05.041/12:47:59) -
STARTAT(DSNAME) -
SPHERE(PAYROLL.SOURCE.BASE)
MVSLOG -
NAME(SAMPLE.CICS.DFHJ01)
BLDVRP
//*
//
In the sample recovery job produced by CICS VR, above, step RES001 restores the data set by calling the IDCAMS REPRO utility. Step DWW001 then forward recovers the restored data set using the recovery parameters that were specified through the CICS VR panel interface. If the IBM® default values were accepted, all updates made after the backup was created, up to the current point-in-time, is applied during recovery processing.