SAS provides support
for the record-level sharing (RLS) access feature for VSAM data sets.
For the RLS access feature to work, you must define your VSAM clusters
as eligible for RLS access.
RLS eligible data sets
must be SMS data sets that were defined with a LOG specification.
The details of RLS definition, restrictions, and use are contained
in the
IBM Data Facility Storage Management Subsystem (DFSMS) documentation.
SAS determines whether
a VSAM data set is RLS eligible when it opens the data set. If the
data set is RLS eligible, SAS automatically opens it in RLS mode except
in the following circumstances:
-
A data set LOAD operation will
be performed.
-
The SMSVSAM server is not available.
Note: If the SMSVSAM server is
available but not accessible (thus causing an RLS OPEN to fail), SAS
attempts to open the data set in non-RLS mode.
When a data set is opened
in RLS mode, the following note is written to the SAS log:
NOTE: Fileref <fileref_name> opened in RLS mode.
The RLS default action
can be overridden by specifying either VSAMRLS or NOVSAMRLS system
options, which apply to all data sets referenced during the SAS session.
To override the RLS default action to a specific data set, you can
use the RLS or NORLS options with the FILE and INFILE statements.
(See
VSAMRLS System Option.)
Opening the data set
in non-RLS mode might generate the following results:
-
If you are opening the data set
for output, then the OPEN operation will fail if another application
has the data set open. Alternatively, an attempt to subsequently open
the data set by another application will fail while the data set is
open in non-RLS output mode by SAS.
-
If you are opening the data set
for input, the OPEN operation will succeed, even though the data set
is open by another application, as long as you specify SHAREOPTIONS(2)
when you define the VSAM cluster.
Once a data set has
been opened by VSAM in RLS mode, integrity is handled according to
the
IBM Data Facility Storage Management Subsystem (DFSMS) documentation. SAS software does not make or enforce these integrity
rules.
Note: RLS processing can impose
a significant overhead, and is not recommended when large quantities
of VSAM data are to be read or written. Overhead is minimized when
the RLSREAD specification is set to NRI. This is the default setting.
A value for RLSREAD can be set via an INFILE statement, or via the
RLS specification of a JCL DD statement or TSO ALLOC command.
The operation of RLS
is essentially transparent to users. However, make sure you specify
DISP=SHR in the statement that defines the VSAM file that you are
opening.