IBM SC34-7012-01 Server User Manual


 
The remainder of this topic on switching to non-RLS access mode describes the
options that are available if you need to switch to non-RLS mode and are
prevented from doing so by retained locks.
Resolving retained locks before opening data sets in non-RLS
mode
VSAM sets an ‘RLS-in-use’ indicator in the ICF catalog cluster entry when a data
set is successfully opened in RLS mode.
About this task
This indicator remains set, even when a data set opened in RLS mode is closed by
all CICS regions, to show that the data set was last accessed in RLS mode. The
indicator is cleared only when a data set is successfully opened in non-RLS mode.
However, if SMSVSAM also holds retained locks against a data set, a non-RLS
open fails and the RLS-in-use indicator remains set. In this event, try to resolve
retained locks before attempting to use a data set in non-RLS mode for batch
processing.
The procedure described here lists the steps you can take to switch from RLS to
non-RLS mode in readiness for batch processing. The procedure is for a single data
set, and should be repeated for each data set that is to be accessed from batch in
non-RLS mode. CICS provides a suite of sample programs designed to help you to
automate most of this procedure, which you can tailor to suit your own
requirements (see “The batch-enabling sample programs” on page 178):
Procedure
1. Prevent further use of the applications that access the data set, so that no more
locks can be created. One way to do this is to disable transactions that use the
data set; but you may have your own technique for quiescing applications.
2. Check for any retained locks by using the INQUIRE DSNAME command on
each CICS region that has been accessing the data set (see “INQUIRE
DSNAME” on page 175). Generally there should not be any, and you can
continue by quiescing the data set and running your batch program(s).
3. If there are retained locks, the RLS-in-use indicator prevents the data set being
opened in non-RLS mode. In this case, use the CAUSE and REASON options
on the INQUIRE UOWDSNFAIL command to find out what has caused them.
You can then take steps to resolve the retained locks, preserving data integrity
or not, using the SET DSNAME command. Do this before you quiesce the data
set, because in some instances the locks cannot be resolved while the data set is
quiesced.
4. Use the access method services SHCDS LIST subcommand to check whether
there are any locks held by CICS regions on which you have not issued
INQUIRE DSNAME; for example, because the system is not currently running.
See z/OS DFSMS: Access Method Services for ICF.
5. If, for some reason, there are retained locks that you cannot resolve, you can
choose to use the SHCDS PERMITNONRLSUPDATE subcommand that allows
the batch program to override the retained locks and force the open for the
data set.
6. When you are satisfied that there are no more retained locks, quiesce the data
set and run your batch program(s).
Investigating which retained locks are held and why
CICS does not know exactly which locks are held by VSAM RLS.
174 CICS TS for z/OS 4.1: Recovery and Restart Guide