Recovery of data set with volume still available
You must use the following procedure to preserve any retained locks that SMSVSAM is holding against the data in the old data set. If you do not complete this procedure, the locks will not be valid for the new data set, with potential loss of data integrity.
The following steps outline the procedure to forward recover a data set accessed in RLS mode. The procedure refers to two data sets; the failed data set, and the new one into which the backup is restored. When you build your JCL to implement this process, ensure that you reference the correct data set at each step.
- Quiesce the data set.
To prevent further accesses to the failed data set, quiesce it using the CEMT, or EXEC CICS®, SET DSNAME QUIESCED command.
- Create a new data set.
Create a new data set into which the backup is to be restored. At this stage, it cannot have the same name as the failed production data set.
- Issue FRSETRR.
Use this access method services SHCDS subcommand to mark the failed data set as being subject to a forward recovery operation. This makes the data set unavailable to tasks other than those performing recovery functions, and also allows the following unbind operation to succeed.
- Issue FRUNBIND.
Use this access method services SHCDS subcommand to unbind any retained locks against the failed data set. This enables SMSVSAM to preserve the locks ready for re-binding later to the new data set used for the restore. This is necessary because there is information in the locks that relates to the old data set, and it must be updated to refer to the new data set. Unbinding and re-binding the locks takes care of this.
Note: You can include the access method services SHCDS FRSETRR and FRUNBIND subcommands of steps 3 and 4 in the same IDCAMS execution, but they must be in the correct sequence. For example, the SYSIN input to IDCAMS would be as follows://SYSIN DD * SHCDS FRSETRR(old_dsname) SHCDS FRUNBIND(old_dsname) /* - Restore the backup.
After the unbind, restore a full backup of the data set to the new data set created in step 2. You can use the recovery function (HRECOVER) of DFSMShsm™ to do this.
- Issue the FRSETRR subcommand.
Use this access method services SHCDS subcommand to mark the new data set as being subject to a forward recovery operation. This is necessary to allow the later bind operation to succeed.
- Run the forward recovery utility.
Run your forward recovery utility to apply the forward recovery log to the restored data set, to redo all the completed updates.
- Delete the old data set.
Delete the old data set to enable you to rename the new data set to the name of the failed data set.
- Alter the new data set name.Use access method services to rename the new data set to the name of the old data set.
You must give the restored data set the name of the old data set to enable the following bind operation to succeed.ALTER CICS.DATASETB NEWNAME(CICS.DATASETA) - Issue the FRBIND subcommand.
Use this access method services SHCDS subcommand to re-bind to the recovered data set all the retained locks that were unbound from the old data set.
- Issue the FRRESETRR subcommand.
Use this access method services SHCDS subcommand after the re-bind to re-enable access to the data set by applications other than the forward recovery utility.
Note: You can include the SHCDS FRBIND and FRRESETRR subcommands of steps 10 and 11 in one IDCAMS execution, but they must be in the correct sequence. For example, the SYSIN input to IDCAMS would be as follows://SYSIN DD * SHCDS FRBIND(datasetname) SHCDS FRRESETRR(datasetname) /*
CEMT SET DSNAME(CICS.DATASETA) QUIESCED
DEFINE CLUSTER(NAME(CICS.DATASETB) …
SHCDS FRSETRR(CICS.DATASETA)
SHCDS FRUNBIND(CICS.DATASETA)
HRECOVER (CICS.DATASETA.BACKUP) … NEWNAME(CICS.DATASETB)
SHCDS FRSETRR(CICS.DATASETB)
EXEC PGM=fwdrecov_utility
DELETE CICS.DATASETA
ALTER CICS.DATASETB NEWNAME(CICS.DATASETA)
SHCDS FRBIND(CICS.DATASETA)
SHCDS FRRESETRR(CICS.DATASETA)
If you use CICS VSAM Recovery for z/OS®, the SHCDS functions are performed for you (see CICS VSAM Recovery for z/OS).
After successful forward recovery, CICS can carry out any pending backout processing against the restored data set. Backout processing is necessary because the forward recovery log contains after images of all changes to the data set, including those that are uncommitted, and were in the process of being backed out when the data set failed.