Chapter Contents

Previous

Next
SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference

Levels of Locking

SAS software supports several levels of locking through the CNTLLEV data set option. If CNTLLEV equals REC (the default), SYSTEM 2000 software performs record level locking. The interface view engine interprets any CNTLLEV setting other than REC to signify that it should do an exclusive open of the database. Also, the database is under exclusive use if you have issued the S2KLOAD statement in the DBLOAD procedure. Exclusive use locks out all other users entirely until the database is closed, which normally occurs when the procedure ends. (The database close operation depends on the procedure.)

Note:   Some SAS procedures set CNTLLEV equal to MEM internally for their own processing reasons. Many statistical procedures must make multiple passes of the data. For example, finding the median requires more than one pass.  [cautionend]

In a Multi-User environment, exclusive use of a database can cause undesirable contention for a database. Also, if you have specified optimized load mode (S2KLOAD) in the DBLOAD procedure, your input to that load cannot be a SYSTEM 2000 view descriptor for a database in the same environment.

When exclusive use of the database is not requested, the interface view engine uses SYSTEM 2000 record-level locking and multiple local holds. Basically, an observation is locked for retrieval and unlocked only when some other observation is retrieved or when the file is closed. Updates do not unlock the observation. This kind of locking could cause contention in a SYSTEM 2000 database. The interface view engine takes the following steps to keep the contention to a minimum:

The purpose of this locking mechanism is to avoid contention. You can always access a path as long as the bottom record can be locked. You will not have to wait for someone else to drop a lock on one of the upper level records. (However, there might be relatively few locks of upper level records.) You are guaranteed to be able to update only items in the record at the bottom of the view descriptor. The engine will tolerate attempts to update any level and will honor the update if it can.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.