Preparing for shadow forward recovery

How to create a shadow copy of your VSAM sphere.

  • Use IDCAMS to create a new, empty VSAM sphere.
  • Copy the original VSAM sphere into the new VSAM sphere. The new VSAM sphere is your shadow copy.
  • Set up a CICS® VR shadow forward recovery job to regularly update the shadow copy.

You can set up a shadow forward recovery job to update a shadow copy of your VSAM file. Figure Sample scan and shadow forward recovery job shows an example of using LOGOFLOGS SCAN to update the RCDS with the latest information from the log of logs and the forward recovery job to update the shadow copy. Run this job regularly so that the shadow is kept as up-to-date as possible.

Figure 1. Sample scan and shadow forward recovery job
//SHADEX   JOB ACCOUNTING INFORMATION,REGION=0M
//*-------------------------------------------------------------------*/
//* Scan the logoflogs                                                */
//*-------------------------------------------------------------------*/
//SCANLOG  EXEC PGM=DWWAR
//STEPLIB  DD DSN=DWW.SDWWLOAD,DISP=SHR
// DD DSN=DWW.SDWWLENU,DISP=SHR
//SYSUDUMP DD   SYSOUT=*
//DWWDUMP  DD   SYSOUT=*
//DWWMSG   DD   SYSOUT=*
//DWWPRINT DD   SYSOUT=*
//DWWCON1  DD   DSN=DWW.DWWCON1,DISP=SHR
//DWWCON2  DD   DSN=DWW.DWWCON2,DISP=SHR
//DWWCON3  DD   DSN=DWW.DWWCON3,DISP=SHR
//DWWIN    DD   *
     LOGOFLOGS SCAN RECOVERYREPORT(YES)
/*
//*-------------------------------------------------------------------*/
//* Update the shadow copy                                            */
//*-------------------------------------------------------------------*/
//RECOVER   EXEC PGM=DWWCO
//STEPLIB   DD DSN=DWW.SDWWLOAD,DISP=SHR
// DD DSN=DWW.SDWWLENU,DISP=SHR
//DWWDMSG   DD   SYSOUT=*
//DWWPRINT  DD   SYSOUT=*
//DWWMSG    DD   SYSOUT=*
//DWWCON1   DD   DSN=DWW.DWWCON1,DISP=SHR
//DWWCON2   DD   DSN=DWW.DWWCON2,DISP=SHR
//DWWCON3   DD   DSN=DWW.DWWCON3,DISP=SHR
//DWWIN     DD   *
   MVSLOG NAME(DWW.SH.FILELOG)
   RECOVER SPHERE(R40SH010.BL.ESDS01) -
     NEWSPHERE(R40SH010.BL.SHADOW)-
     SHADOW
/*
Note: Consider the following point if the REMOTE keyword is added to the shadow recovery job, you are using the CICS VR VSAM batch logger to log updates made to VSAM spheres by batch jobs, and one of the following conditions is true:
  • The RCDSs that were allocated to CICS VR when the batch jobs were run are not available to the shadow recovery job.
  • You are running the shadow recovery job while the CICS VR VSAM batch logger is concurrently logging updates being made to the spheres by batch jobs.
If the previous items are true, ensure that you are not deleting log records that have a timestamp later than the timestamp of the latest log record that has been applied by the latest execution of the shadow recovery job. The timestamp of the latest log record that is applied by a shadow recovery job is listed in the report produced by a shadow recovery job. This timestamp can be earlier than the actual submission date and time of the shadow recovery job.
For example, if the previous conditions are true, consider a scenario where:
  • A shadow recovery job is submitted at 04.253 09:59:59
  • The timestamp of the latest log record applied by the shadow recovery job is 04.253 07:32:57
In this scenario, be sure not to delete the log stream blocks or copies with a timestamp later than 04.253 07:32:57. CICS VR might need to read log records immediately after this timestamp during the next execution of the shadow recovery job.