CICS BAC request server RLS processing

When all the circumstances are such that the CICS BAC request server is enabled to perform its RLS processing, its actions are as follows:

Note that transaction IDs and programs associated with the files defined to be opened in RLS mode are processed in the same manner as all other file commands. That is, for close requests, transaction IDs and programs are disabled before the quiesce and close command. For open requests, transactions IDs and programs are enabled after the unquiesce and open commands.

When CICS BAC issues a quiesce command for a data set opened in RLS-mode , the request is passed to the SMSVSAM server by the CICS region in which the command is issued. SMSVSAM propagates the request to all CICS regions in the sysplex that currently have the data set unquiesced and open. This results in all files in those regions that refer to the data set being closed and the data set marked as quiesced. A data set cannot be opened in RLS mode by a CICS region if it is marked as quiesced. It can, however, be allocated and opened in non-RLS mode for batch processing. Once all the files are closed, control returns back to CICS BAC in the original CICS region, where command processing continues.

As a result of an unquiesce command issued by CICS BAC for a data set defined in RLS mode , the status of the data set throughout the sysplex is set to unquiesced, and the data set can subsequently be opened in RLS mode by any CICS region in the sysplex.

As already mentioned earlier, CICS BAC cannot perform its RLS processing for a SET FILE command if either the target CICS region, or the CICS BAC request server, is not active, because the batch request utility cannot determine whether or not the file is defined with RLSACCESS(YES). Therefore, if you know that files are defined in CICS regions to be opened in RLS mode, you should strongly consider using the CICS BAC CICS group feature to broadcast SET FILE commands that operate on those files. When you do this, the SET FILE command is sent in sequence to each of the CICS regions in the group. If CICS BAC is available in any of the target CICS regions named in the group member, it will detect that the file is defined as RLSACCESS(YES), and issue the appropriate quiesce or unquiesce command. Then, when the CICS BAC request server processes the SET FILE command in a subsequent region in the CICS group, it will recognize that the data set is already in the appropriate quiesce state and not issue another quiesce or unquiesce command.

CICS BAC also performs special processing for RLS-mode files during its region startup processing. If it detects that it needs to change the open or closed state of a file, and

CICS BAC first checks the current quiesce state of the associated data set and issue the corresponding quiesce or unquiesce command as necessary.

You should give special consideration to RLS-mode files with respect to associating transaction IDs and programs with such files. For normal (non-RLS-mode) files, the timing of the processing of associated transaction IDs and programs depends on the requested status for the file.

This is also true for RLS-mode files. However, one of the effects of the quiesce command issued by CICS BAC is that all files in all regions in the sysplex that refer to the data set being quiesced are subsequently closed by the CICS regions. In those regions, the associated transaction IDs and programs have not yet been disabled, which could result in NOTOPEN conditions being raised.

For example, consider the following illustration:

FILE1 is present and open in both in CICSA and CICSB
In both regions, FILE1 points to DATASET1
In CICS BAC, transaction ID TRN1 and program PROGRAM1 are both associated 
   with FILE1
CICS BAC CICS group data set member CICSGRP1 contains CICS region names 
   CICSA and CICSB and both these regions are available.

In this scenario, when the following command is processed by the CICS BAC request server:

SET FILE(FILE1),OPENSTATUS(CLOSE),PROCESSTRAN(YES),PROCESSPROG(YES),
	CICS(CICSGRP1)

the following sequence of processing takes place:

  1. In CICSA:
    1. CICS BAC issues SET commands to disable TRN1 and PROGRAM1
    2. CICS BAC detects that FILE1 has RLSACCESS(YES)
    3. CICS BAC issues a SET command to quiesce DATASET1, and on notification from CICSA, SMSVSAM propagates the quiesce request to CICSB.
  2. In CICSB:
    1. CICS closes FILE1 as a result of the quiesce command for DATASET1
    2. SMSVSAM marks DATASET1 as quiesced.
  3. In CICSA, CICS BAC closes FILE1
  4. In CICSB:
    1. CICS BAC issues SET commands to disable TRN1 and PROGRAM1
    2. CICS BAC detects that FILE1 has RLSACCESS(YES), but its quiesce state is correct so it does not issue a quiesce command
    3. CICS BAC detects that FILE1 is currently closed, so it does not issue a close command.
  5. Processing is complete.

A potential problem in this illustration is that the TRN1 and PROGRAM1 are not disabled in CICSB until after the file has already been closed. This problem can be eliminated by using application groups instead of associating transaction IDs and programs with RLS-mode files. For example, in this variation of our scenario, everything is the same as before except that TRN1 and PROGRAM1 are not associated with FILE1. Instead, TRN1 and PROGRAM1 are defined as objects in the CICS BAC application group FILE1GRP. Thus, when the following commands are issued:

DEFAULT CICS(CICSGRP1)
SET GROUP(FILE1GRP),ENABLESTAT(DISABLED)
SET FILE(FILE1),OPENSTATUS(CLOSE)

the following sequence of processing takes place:

  1. In CICSA, CICS BAC issues SET commands to disable TRN1 and PROGRAM1
  2. In CICSB, CICS BAC issues SET commands to disable TRN1 and PROGRAM1.
  3. In CICSA:
    1. CICS BAC detects that FILE1 has RLSACCESS(YES)
    2. CICS BAC issues a SET command to quiesce DATASET1.
  4. In CICSB, FILE1 is closed as a result of the quiesce command for DATASET1
  5. SMSVSAM marks DATASET1 as quiesced
  6. 7. In CICSA, CICS BAC closes FILE1
  7. In CICSB:
    1. CICS BAC detects that FILE1 has RLSACCESS(YES), but its quiesce state is correct so it does not issue a quiesce command
    2. CICS BAC detects that FILE1 is currently closed, so it does not issue a close command.
  8. 10. Processing is complete.

Note that in the second illustration using an application group, TRN1 and PROGRAM1 are disabled in both regions before the file is quiesced and closed in either region. Similar results can be achieved with other variations of the above, including creating one group to disable the program and transaction and close the file. In this scenario, a second application group should be used to open the file and enable the program and transaction, with special care being taken when creating both groups to specify the objects in the appropriate order. That is, in the close group, specify all transaction IDs and programs before the file or files. Likewise, in the open group, specify the file or files before all transaction IDs and programs.

For more information about how CICS quiesces data sets in use in RLS mode within a sysplex, see the CICS Recovery and Restart Guide for CICS Transaction Server for z/OS.