IBM SC34-7012-01 Server User Manual


 
v Create a new empty data set into which the copy is to be restored, and use
IMPORT to copy the data from the exported version of the data set to the new
empty data set.
v Use SHCDS FRSETRR to mark the original data set as being under maintenance.
v Use SHCDS FRUNBIND to unbind the locks from the original data set.
v Use SHCDS FRSETRR to mark the new data set as being under maintenance.
v Delete the original data set.
v Rename the new data set back to the old name.
v Use SHCDS FRBIND to associate the locks with the new data set.
v Use SHCDS FRRESETRR to take the data set out of maintenance.
An example follows of the access method services commands used to restore a
portable copy of a data set created by EXPORT. The example assumes that
EXPORT has been used to create a copy of data set CICS.DATASET.A and that an
empty data set with the correct VSAM characteristics called CICS.DATASET.B has
been created into which the data will be imported.
IMPORT INTOEMTPTY INDATASET(CICS.DATASET.A.COPY) OUTDATASET(CICS.DATASET.B)
SHCDS FRSETRR(CICS.DATASET.A)
SHCDS FRUNBIND(CICS.DATASET.A)
SHCDS FRSETRR(CICS.DATASET.B)
DELETE CICS.DATASET.A
ALTER CICS.DATASET.B NEWNAME(CICS.DATASET.A)
SHCDS FRBIND(CICS.DATASET.A)
SHCDS FRRESETRR(CICS.DATASET.A)
Rebuilding alternate indexes
If you delete and rebuild an alternate index (using BLDINDEX) it is equivalent to
moving the alternate index data set.
About this task
It is possible that VSAM might be holding locks on a unique key alternate index
when you want to delete and rebuild an alternate index. In this case, ensure that
you preserve the locks over the delete and rebuild process by setting ‘Recovery
Required’ and transferring the locks to the rebuilt index. The steps you need to
preserve the locks across a rebuild are:
1. Issue SHCDS FRSETRR to indicate the data set is under maintenance.
2. Issue SHCDS FRUNBIND to get VSAM to save the locks, to be re-applied after
the rebuild.
3. Delete and redefine the alternate index.
4. Rebuild the alternate index (using BLDINDEX).
5. Issue FRBIND to bind the retained locks to the newly built alternate index.
6. Issue SHCDS FRRESETRR to unset the under-maintenance flag.
186 CICS TS for z/OS 4.1: Recovery and Restart Guide