Previous Page | Next Page

Data Set Options under OpenVMS

CNTLLEV= Data Set Option: OpenVMS



Specifies the level of shared access to SAS data sets.
Default: varies
Valid in: DATA step and PROC steps
Category: Data Set Control
Engines: V9, V8, V7, CONCUR
OpenVMS specifics: syntax
See: CNTLLEV= Data Set Option in SAS Language Reference: Dictionary

Syntax
Details

Syntax

CNTLLEV=MEM | REC

MEM

specifies that concurrent access is controlled at the SAS data set (or member) level. Member-level control restricts concurrent access to only one update or output process but allows READ access to many sessions, procedures, or statements.

REC

specifies that concurrent access is controlled at the observation (or record) level. Record-level control allows more than one UPDATE access to the same SAS data set, but it denies concurrent update of the same observation.


Details

The CNTLLEV= option specifies the level at which shared UPDATE access to a SAS data set is denied.

With the CONCUR engine, you can request exclusive access to the file, or you can share access with record-level locking.

By default with the concurrency engine, data sets that are opened for input allow shared READ access; data sets that are opened for output demand exclusive access; and data sets that are opened for update either allow shared READ and shared WRITE access or they retain exclusive access to the file, depending on the method that is used.

For example, you can allow other users both READ and WRITE access to a data set that you are opening for input only. By default, only shared READ access is allowed. To enable record-level locking for the data set TEST.TWO, use the following statements:

libname test concur '[mydir]';
data test.one;
   set test.two(cntllev=rec);
run;

As another example, suppose you want to both plot and update your file simultaneously by using the FSEDIT procedure. By default, the PLOT procedure opens a data set for exclusive access, even though it only reads the file. To allow concurrent access, use the following statements:

libname test concur '[mydir]';
proc plot data=test.a(cntllev=rec);
run;

Note:   The CNTLLEV= data set option is ignored for output files; output files always retain exclusive access.  [cautionend]

Previous Page | Next Page | Top of Page