IBM Z and LinuxONE - IBM Z

IBM Z

The enterprise platform for mission-critical applications brings next-level data privacy, security, and resiliency to your hybrid multicloud.

 View Only

Converting VSAM files from non-RLS to RLS

By Pavitra Babu Mulimani posted Fri November 18, 2022 05:07 AM

  

Objectives:

  • We can use batch logging to log changes to VSAM data sets that are not accessed in RLS mode when the VSAM data set is not being used by CICS TS.
  • CICS VR VSAM batch logging can only be used with non-RLS access, that is, if value of MACRF is set to NSR (non-shared resources) or LSR (local shared resources), or GSR (global shared resources), and if MACRF value is not set to RLS.


Some terminology

  1. Record Level Sharing (RLS) is a mode of access to a VSAM sphere that is interpreted at OPEN time; RLS is not an attribute of a sphere. RLS is selected by specifying the RLS JCL parameter or by specifying MACRF=RLS in the access method control block (ACB).
  2. CICS VR VSAM batch logging provides logging for non-RLS data sets only. The VSAM data sets must be opened with the ACB setting MACRF=NSR (Non-shared resources) or LSR (Local shared resources), or GSR (Global shared resources). The RLS JCL parameter must not be set.

 

Changes needed to handle the situation

  1. Converting VSAM files from non-RLS to RLS:
    1. Changes needed in CICSVR:
Use CICS VR VSAM batch logging after you have brought down CICS TS or have issued a command to deallocate the files your batch jobs need to update.

For example, you can use the following CICS TS command to disable (deallocate) PAYROLL so your batch jobs can update that file, and CICS VR VSAM batch logging can log the changes:

CEMT SET FILE(PAYROLL) CLOSED DISABLED

     b. Redefining log stream: No need to redefine.

  1. DSS backup type for BWO (backup-while-open) enabled RLS VSAM dataset is:
    • DSS backup type for BWO enabled RLS VSAM dataset should be DUMP.
    • BWO set to TYPECICS.
    • When DFSMSdss performs a logical dump, it examines the backup-while-open flags in the integrated catalog facility (ICF) catalog and reports on the success or failure of the backup.

For example,

      • If a VSAM control interval (CI) or control area (CA) split is in progress at the start of a backup, the backup is not made.
      • Also, if a split occurs during a backup-while-open backup or a split is still in progress after a backup, DFSMShsm logically discards the backup.
      • If you are using DFSMSdss without DFSMShsm, examine the reports that DFSMSdss produces to find out if the logical dump has been successful.
      • But, if you use the concurrent copy function with BWO, CI, or CA, splits do not affect the contents of the copy being made.

 

  1. Parameters required in CICS TS to use RLS & BWO VSAM dataset:
    • If you specify file definitions that open a data set in RLS mode, you must specify the recovery options in the ICF catalog.
    • The recovery options on the CICS TS file resource definitions (RECOVERY, FWDRECOVLOG, and BACKUPTYPE) are ignored if the file definition specifies RLS access.
    • The VSAM parameters LOG and LOGSTREAMID on the access methods services DEFINE CLUSTER and ALTER commands determine recoverability for the entire sphere. Locating these recovery attributes in the ICF catalog enforces the same attributes for all CICS regions in the sysplex for all the files opened against a given sphere.
    • Examples for cluster definition and Alter commands:
    • DEFINE CLUSTER:

      ALTER:

    • Below are the parameters required in CICS TS to use RLS and BWO VSAM dataset:

      LOG ({NONE | UNDO| ALL})

      Specifies the type of recovery required for the VSAM sphere. Specify the LOG parameter for data sets that are to be used by CICS in RLS mode:              

      NONE

      The sphere is not recoverable.

      UNDO

      The sphere is recoverable. CICS TS must maintain system log records for backout purposes.

      ALL

      The sphere is recoverable for both backout and forward recovery. CICS must maintain system log records (as for UNDO) and forward recovery log records. If you specify LOG(ALL), also specify LOGSTREAMID to indicate the name of the forward recovery log. Use LOG(ALL) for files that you want to recover using CICS VR.

      LOGSTREAMID (log_stream_name)
      Specifies the name of the MVS™ log stream to be used for forward recovery log records when LOG(ALL) is defined. Note that IDCAMS does not check for the presence of the LOGSTREAMID during DEFINE processing. CICS checks for an MVS log stream name when it attempts to open a data set in RLS mode. The open fails if the log stream is not defined and cannot be created dynamically.

      BWO (TYPECICS | TYPEIMS | TYPEOTHER | NO)

      TYPECICS specifies that CICS TS BWO support is required. This is the equivalent of BACKUPTYPE(DYNAMIC) in the CSD. The other values refer to non-CICS support.

       

      If you omit the LOG parameter when you define your VSAM data sets, recovery is assumed to be UNDEFINED, and the data set cannot be opened in RLS mode. You can also set the UNDEFINED status explicitly by specifying NULLIFY(LOG).

       

      Reference links: 

      1. https://www.ibm.com/docs/en/cics-vr/5.1?topic=logging-using-cics-vr-vsam-batch
      2. https://www.ibm.com/docs/en/cics-vr/5.1?topic=facility-operation-bwo
      3. https://www.ibm.com/docs/en/cics-vr/5.1?topic=files-vsam-accessed-in-rls-mode

       

      Pavitra Mulimani

      DEV Engineer – CICS VR

0 comments
9 views

Permalink