Recovery of data set with loss of volume
Moving a data set that has retained locks means the locks associated with the original data set have somehow to be attached to the new data set.
In the event of a lost volume, a volume restore implicitly moves data sets. Even if you are using CICS® VSAM Recovery for z/OS®, which normally takes care of re-attaching locks to a recovered data set, the movement of data sets caused by loss of a volume cannot be managed entirely automatically.
- ROUTE *ALL,VARY SMS,SMSVSAM,TERMINATESERVER
- VARY SMS,SMSVSAM,FORCEDELETELOCKSTRUCTURE
- ROUTE *ALL,VARY SMS,SMSVSAM,ACTIVE
The first command terminates all SMSVSAM servers in the sysplex and temporarily disables the SMSVSAM automatic restart facility. The second command (issued from any MVS™) deletes the lock structure. The third command restarts all SMSVSAM servers, as a result of which SMSVSAM records, in the sharing control data set, that data sets are in lost locks state. The automatic restart facility is also reenabled.
Each CICS region detects that its SMSVSAM server is down as a result of the TERMINATESERVER command, and waits for the server event indicating the server has restarted before it can resume RLS-mode processing. This occurs at step 3 in the preceding procedure.
It is important to realize the potential impact of these commands. Deleting the lock structure puts all RLS-mode data sets that have retained locks, or are open at the time the servers are terminated, into the lost locks condition. A data set which is in lost locks condition is not available for general access until all outstanding recovery on the data set is complete. This is because records are no longer protected by the lost locks, and new updates can only be permitted when all shunted UOWs with outstanding recovery work for the data set have completed.
When CICS detects that its server has restarted, it performs dynamic RLS restart, during which it is notified that it must perform lost locks recovery. During this recovery process, CICS does not allow new RLS-mode work to start for a given data set until all backouts for that data set are complete. Error responses are returned on open requests issued by any CICS region that was not sharing the data set at the time SMSVSAM servers were terminated, and on RLS access requests issued by any new UOWs in CICS regions that were sharing the data set. Also, indoubt UOWs must be resolved before the data set can be taken out of lost locks state.
For RLS-mode data sets that are not on the lost volume, the CICS regions can begin lost locks recovery processing as soon as they receive notification from their SMSVSAM servers. For the data sets on these other volumes, recovery processing completes quickly and the data sets are removed from lost locks state.
For those data sets that are unavailable (for example, they are awaiting forward recovery because they are on the lost volume), CICS runs the backouts only when forward recovery is completed. In the case of CICS VSAM Recovery for z/OS-managed forward recovery, completion is Signaled automatically, and recovered data sets are removed from lost locks state when the associated backouts are run.