Example using the CICS VR NOTIFY utility and restore skeletons

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:

  1. Create a backup of a VSAM data set and register the backup in the RCDS.
  2. Restore the data set from the registered backup and perform a forward recovery.
Step 1: Create a backup of a VSAM data set and register it in the CICS VR RCDS

Below is a sample job that creates a backup of a VSAM data set, then registers the backup in the CICS VR RCDS.

Figure 1. Sample job to create a backup of a VSAM data set and register the backup to CICS VR
//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)
//
BACKUP
The BACKUP job step creates a backup of the VSAM data set defined in the INDSN variable using IDCAMS REPRO. The name of the backup is taken from the OUTDSN variable.
Note: In this sample scenario, production and backup data sets are cataloged and SMS-managed. The backup data set is therefore created by specifying the LIKE parameter within the DD JCL statement for the backup data set. See the MVS JCL Reference manual for more information about the LIKE parameter and defining data sets in the DD statement.
REGISTER
The REGISTER job step calls the CICS VR NOTIFY utility. The CICS VR NOTIFY utility registers the backup in the CICS VR RCDS.
Step 2: Restore the data set from the registered backup and perform a forward recovery

After performing steps 1 and 2, 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.

Figure 2. DWWREPRO restore skeleton
)CM*******************************************************************/
)CM                                                                  */
)CM     @BANNER_START                                                */
)CM      Licensed Materials - Property of IBM                        */
)CM                                                                  */
)CM      5655-GY1                                                    */
)CM                                                                  */
)CM      (C) Copyright IBM Corp. 2014                                */
)CM      (C) Copyright HCL Technologies Ltd. 2025                    */
)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:

  • The backup data set is restored by calling the IDCAMS REPRO utility. However, the target data set must exist and be cataloged prior to running the restore and recovery job.
    Note: You can either create the target data set prior to running CICS VR, or you can update the skeleton to include a definition of the target data set.
  • This skeleton contains logic to specify the volume, unit, and sequence number as part of the DD statement for a backup that is uncataloged.
    Note: In this example scenario, the NOTIFY program did not pass the volume, unit, and sequence number to the file copy notification service because all backups are cataloged in this example environment.
  • This skeleton contains the &CTODSN variable to include either a newly specified target data set name or the original data set name in the OUTDATASET keyword.

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:

Figure 3. Sample recovery job
//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, 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.