Batch-enabling sample programs for RLS access-mode data sets (DFH0BATx)

If you have recoverable VSAM data sets that are open in RLS access mode to CICS® regions and you want to update them from a batch application, you must typically quiesce the data sets before using them in batch mode. This section describes some procedures that you can use to help you to automate the process of preparation for batch processing.

Before you begin

If you do not want to quiesce your recoverable VSAM data sets, you can use DFSMStvs which allows online updating of VSAM recoverable data sets. Using DFSMtvs allows CICS full read and write access to any VSAM data sets that it is using. For more information about DFSMStvs, see z/OS DFSMStvs Planning and Operating Guide.

About this task

A batch program cannot open a data set in non-RLS access mode if there are any files open against it in RLS access mode. To switch from RLS to non-RLS access mode for batch update, you must first quiesce the data set. The VSAM RLS quiesce mechanism causes all CICS regions in the sysplex to close any RLS-mode files that are open against a specified data set. After they have been closed under the quiesce mechanism, data sets can be opened only in non-RLS mode. To re-enable quiesced data sets to be re-opened in RLS mode, all open non-RLS mode files must be closed and then the data sets must be unquiesced.

Note: The quiesce mechanism cannot inform batch programs that have the data set open in RLS access mode about the quiesce request. If you have such programs, you should use the DFSMS SHCDS LIST subcommands to check whether any non-CICS jobs have files open in RLS mode against the data set. For information about the SHCDS LIST subcommand, see z/OS DFSMS Access Method Services Commands.

Quiescing a data set sets the quiesce flag in the ICF catalog so that the data set can be opened in non-RLS mode only. This is the recommended way of making data sets available for batch programs. However, even if a data set has been quiesced, you still cannot open it for update in non-RLS access mode if SMSVSAM is holding retained locks against the data set. This is because the locks are needed to preserve data integrity: they protect changes that are waiting to be either committed or backed out.

The DFH0BATx sample programs described in this section are provided by CICS to help you to deal with any retained locks. When you have successfully dealt with these, you can quiesce the data sets to close the RLS-mode files using the SPI or CEMT commands.

For more information about the procedures you should follow for checking and handling retained locks when switching to non-RLS mode, see Resolving retained locks on recoverable resources.