VSAM record-level sharing (RLS) is a VSAM data set access mode, introduced in DFSMS Version 1 Release 3, and supported by CICS®. RLS enables VSAM data to be shared, with full update capability, between many applications running in many CICS regions. With RLS, CICS regions that share VSAM data sets can reside in one or more MVS™ images within an MVS parallel sysplex.
RLS also provides some benefits when data sets are being shared between CICS regions and batch jobs.
RLS involves the use of the following components:
The CICS interface with SMSVSAM is through an access control block (ACB), and CICS registers with this ACB to open the connection. Unlike the DB2® and DBCTL database manager subsystems, which require user action to open the connections, if you specify RLS=YES as a system initialization parameter, CICS registers with the SMSVSAM control ACB automatically during CICS initialization.
A CICS region must open the control ACB to register with SMSVSAM before it can open any file ACBs in RLS mode. Normal file ACBs remain the interface for file access requests.
Define at least three sharing control data sets, for use as follows:
See the z/OS: DFSMSdfp Storage Administration Reference for more information about sharing control data sets, and for a JCL example for defining them.
With RLS, all the control blocks and buffers are allocated in an associated data space of the SMSVSAM server. This provides one extremely large buffer pool for each MVS image, which can be shared by all CICS regions connected to the SMSVSAM server, and also by batch programs. Buffers in this data space are created and freed automatically.
DFSMS provides the RLS_MAX_POOL_SIZE parameter that you can specify in the IGDSMSxx SYS1.PARMLIB member. There are no other tuning parameters for RLS as there are with LSR pools--management of the RLS buffers is fully automatic.
Using RLS with entry-sequenced data sets (ESDS) can have a negative effect on the performance and availability of the data set when you are adding records. The following issues have been identified:
For these reasons, it is recommended that you do not use RLS with entry-sequenced data sets.
The tests and measurements described in this section were carried out using RLS with key-sequenced data sets (KSDS). As described above, RLS is not recommended for use with entry-sequenced data sets (ESDS), as it can cause problems with performance and availability when you are adding records.
There is an increase in CPU costs when using RLS compared with function-shipping to an FOR using MRO. When measuring CPU usage using the standard DSW workload, the following comparisons were noted:
In terms of response times, the performance measurements showed that:
However, performance measurements on their own do not tell the whole story, and do not take account of other factors, such as:
These negative aspects of using an FOR are resolved by using RLS, which provides the scalability lacking in a FOR.
To use RLS access mode with CICS files:
This section has covered the three different modes that CICS can use to access a VSAM file. These are non-shared resources (NSR) mode, local shared resources (LSR) mode, and record-level sharing (RLS) mode. (CICS does not support VSAM global shared resources (GSR) access mode.) The mode of access is not a property of the data set itself--it is a property of the way that the data set is opened. This means that a given data set can be opened by a user in NSR mode at one time, and RLS mode at another. The term non-RLS mode is used as a generic term to refer to the NSR or LSR access modes supported by CICS. Mixed-mode operation means a data set that is opened in RLS mode and a non-RLS mode concurrently, by different users.
Although data sets can be open in different modes at different times, all the data sets within a VSAM sphere must normally be opened in the same mode. (A sphere is the collection of all the components--the base, index, any alternate indexes and alternate index paths--associated with a given VSAM base data set.) However, VSAM does permit mixed-mode operations on a sphere by different applications, subject to some CICS restrictions.
Using RLS-access mode for VSAM files involves SMSVSAM as well as the CICS region issuing the file control requests. This means monitoring the performance of both CICS and SMSVSAM to get the full picture, using a combination of CICS performance monitoring data and SMF Type 42 records written by SMSVSAM:
The following is an example of the JCL that you can use to obtain a report of SMSVSAM data:
//RMFCF JOB (accounting_information),MSGCLASS=A,MSGLEVEL=(1,1),CLASS=A
//STEP1 EXEC PGM=IFASMFDP
//DUMPIN DD DSN=SYS1.MV2A.MANA,DISP=SHR
//DUMPOUT DD DSN=&&SMF,UNIT=SYSDA,
// DISP=(NEW,PASS),SPACE=(CYL,(10,10))
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
INDD(DUMPIN,OPTIONS(DUMP))
OUTDD(DUMPOUT,TYPE=000:255))
//POST EXEC PGM=ERBRMFPP,REGION=0M
//MFPINPUT DD DSN=&&SMF,DISP=(OLD,PASS)
//SYSUDUMP DD SYSOUT=A
//SYSOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//MFPMSGDS DD SYSOUT=A
//SYSIN DD *
NOSUMMARY
SYSRPTS(CF)
SYSOUT(A)
REPORTS(XCF)
/*
CICS file control statistics contain the usual information about the numbers of file control requests issued in the CICS region. They also identify which files are accessed in RLS mode, and provide counts of RLS timeouts and EXCP counts for RLS files. They do not contain any information about the SMSVSAM server, or its buffer usage, or its accesses to the coupling facility.