IBM SC34-7012-01 manual Rebuilding alternate indexes, About this task

Models: SC34-7012-01

1 268
Download 268 pages 41.5 Kb
Page 198
Image 198

vCreate 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.

vUse SHCDS FRSETRR to mark the original data set as being under maintenance.

vUse SHCDS FRUNBIND to unbind the locks from the original data set.

vUse SHCDS FRSETRR to mark the new data set as being under maintenance.

vDelete the original data set.

vRename the new data set back to the old name.

vUse SHCDS FRBIND to associate the locks with the new data set.

vUse 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.

186CICS TS for z/OS 4.1: Recovery and Restart Guide

Page 198
Image 198
IBM SC34-7012-01 manual Rebuilding alternate indexes, About this task