Chapter Contents

Previous

Next
SAS/SHARE User's Guide

About the SAS Data Hierarchy and Locking

Knowing about the SAS data object hierarchy and locking concepts will help you to understand the behavior of explicit locks that you set by using the LOCK statement or a LOCK command and the conditions under which implicit locks are set automatically. Also explained are the effects of locking on other operations.


The SAS Data Hierarchy

When you perform a SAS operation, the SAS/SHARE server controls what data object is locked and how the data object is locked. This allows you to access the data objects and denies access to those data objects by other users for the duration of the operation.

Hierarchy of SAS data object Types shows the SAS data object type hierarchy.

Hierarchy of SAS data object Types

[IMAGE]

[1] SAS data library
a collection of one or more SAS files that are recognized by SAS. Each file is a member of the library.

[2] Member
a file in a SAS data library that may be one of the following types:

SAS data file
a SAS data set that contains both the data values and the descriptor information. SAS data files are of member type DATA.

SAS data view
a SAS data file in which the descriptor information and observations are obtained from other files. SAS data views store only the information that is required to retrieve data values or descriptor information. SAS data views are of member type VIEW.

SAS utility file
a SAS file that stores information that is private to a component of SAS. Examples include SAS/ACCESS descriptors, MDDB (Multi-Dimensional Data Base) files, and DMDB (Data Mining Data Base) files.

SAS catalog
a SAS file that stores many different kinds of information in smaller units called entries. Some catalog entries contain system information such as key definitions. Other catalog entries contain application information such as window definitions, help windows, formats, informats, macros, or graphics output.

[3] Observation
often referred to as a record, the horizontal component of a SAS data file. An observation is a collection of data values associated with a single entity, such as a customer or a state. Each observation contains one data value for each variable in the data file.

[3]Entry
a unit of information that is stored in a SAS catalog.


How SAS Data Objects Are Accessed and Used

The type of lock that a server sets on a member or an observation is affected by how the operation accesses and uses the SAS data object type. The ways to access a data object are:
input to read data
update to change the values of variables
output to add new variables with values
utility to change the header information of the file.

Each SAS operation has a default behavior for each object that is accessed and the way that the object is accessed. For example, given that the server engine permits observation locking and the observation is not already locked, the server can open and lock an observation in a data set. If the engine does not support observation locking, the engine locks the member (above the observation) instead.

The lowest hierarchical level at which data can be locked varies according to the engine that is used to access the data:

Effects of Object Locking on Other Client Operations shows the combinations of objects that are locked, how objects are locked, and the effects on other client operations.

Effects of Object Locking on Other Client Operations
What Object Is Locked How the Object Is Locked

Input Update Output
Member Other operations can read the data set but cannot open it for update or output. No other operations can access the data set. No other operations can access the data set.
Observation Other operations can read or update the data set but cannot open it for output. Other operations can read or update the data set but cannot open it for output. No other operations can access the data set.


Chapter Contents

Previous

Next

Top of Page

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