The following access method services examples assume that CICS.DATASET.A needs to be redefined and the data moved to a data set named CICS.DATASET.B, which is then renamed:

DEFINE CLUSTER (NAME(CICS.DATASET.B) ...

REPRO INDATASET(CICS.DATASET.A) OUTDATASET(CICS.DATASET.B)

DELETE CICS.DATASET.A

ALTER CICS.DATASET.B NEWNAME(CICS.DATASET.A)

If the recoverable data set has associated RLS locks, these steps are not sufficient because:

vThe REPRO command copies the data from CICS.DATASET.A to CICS.DATASET.B but leaves the locks associated with the original data set CICS.DATASET.A.

vThe DELETE command deletes both the original data set and its associated locks.

vAfter you issue the ALTER command, the data set has been moved but the new data set does not have any associated locks, which have been lost when you deleted the original data set.

To enable you to move data and keep the locks associated with the data, access method services provide the following SHCDS subcommands. These are subcommands of the VSAM sharing control SHCDS command and must always be preceded by the SHCDS keyword:

SHCDS FRSETRR

This command marks the data set as being under maintenance, by setting a flag in the data set’s ICF catalog entry. (This flag is shown as ‘Recovery Required’ in a catalog listing (LISTCAT).)

SHCDS FRUNBIND

This command unbinds any retained locks held against the data set. The locks are no longer associated with any specific disk location or data set.

SHCDS FRBIND

This command re-binds to the new data set all retained locks that were unbound from the old data set. The locks are now associated with the named data set. The data set name used in FRBIND must match the name used in the earlier FRUNBIND.

SHCDS FRRESETRR

This frees the data set from being under maintenance, resetting the flag in the ICF catalog.

Based on the above example of using REPRO to move a VSAM data set, the complete solution for a data set accessed in RLS mode, and which preserves the RLS locks, is as follows:

Procedure

1.Quiesce the data set that is being moved, to prevent access by CICS regions while maintenance is in progress.

2.Create a new data set into which the data is to be copied. At this stage, it cannot have the same name as the old data set. For example:

DEFINE CLUSTER (NAME(CICS.DATASET.B) ...

3.Issue the access method services (AMS) SHCDS FRSETRR subcommand to mark the old data set as being under maintenance. For example:

SHCDS FRSETRR(CICS.DATASET.A)

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

Page 196
Image 196
IBM SC34-7012-01 manual Shcds Frsetrr