observations, and whether other engines are required for processing). The engine
uses this information to organize the data in the standard logical form for SAS
processing.
This standard form is called the SAS data file, which consists of the descriptor
information and the data values organized into columns (variables) and rows
(observations).
SAS procedures and DATA step statements access and process the data only in its
logical form. During processing, the engine executes whatever instructions are
necessary to open and close physical files and to read and write data in appropriate
formats.
Data that is accessed by an engine is organized into the SAS data set model, and in the
same way, groups of files that are accessed by an engine are organized in the correct
logical form for SAS processing. Once files are accessed as a SAS library, you can use
SAS utility windows and procedures to list their contents and to manage them. See
Chapter 24, “SAS Libraries,” on page 575 for more information about SAS libraries.
The following figure shows the relationship of engines to SAS libraries.
Figure 35.2 Relationship of Engines to SAS Libraries
files
engine
SAS utility
windows and procedures
SAS data library model
Engine Characteristics
About Engine Characteristics
The engine that is used to access a SAS data set determines its processing characteristics.
Different statements and procedures require different processing characteristics. For
example, the FSEDIT procedure requires the ability to update selected data values. And,
the POINT= option in the SET statement requires random access to observations as well
as the ability to calculate observation numbers from record identifiers within the file.
The following figure describes the types of activities that engines regulate.
Engine Characteristics 741
Figure 35.3 Activities That Engines Regulate
ACCESS
PATTERNS
Engine
READ/WRITE
ACTIVITY
LOCKING
LEVELS
INDEXING
INTEGRITY
CONSTRAINTS
COMPRESSION/REUSE
GENERATIONS
DATA COMPATIBILITY
Cross Platform
Cross Release
Read/Write Activity
An engine can perform one or more of the following tasks:
limit read/write activity for a SAS data set to read-only
fully support updating, deleting, renaming, or redefining the attributes of the data set
and its variables
support only some of these functions
For example, the engines that process BMDP, OSIRIS, or SPSS files support read-only
processing. Some engines that process SAS views permit SAS procedures to modify
existing observations while others do not.
Access Patterns
SAS procedures and statements can read observations in SAS data sets in one of four
general patterns:
sequential access
processes observations one after the other, starting at the beginning of the file and
continuing in sequence to the end of the file.
random access
processes observations according to the value of some indicator variable without
processing previous observations.
BY-group access
groups and processes observations in order of the values of the variables that are
specified in a BY statement.
multiple-pass
performs two or more passes on data when required by SAS statements or
procedures.
If a SAS statement or procedure tries to access a SAS data set whose engine does not
support the required access pattern, SAS prints an appropriate error message in the SAS
log.
Levels of Locking
Some features of SAS require that data sets support different levels at which Update
access is used. When a SAS data set can be opened concurrently by more than one SAS
742 Chapter 35 SAS Engines
session or by more than one statement or procedure within a single session, the level of
locking determines how many sessions, procedures, or statements can read and write to
the file at the same time. For example, with the FSEDIT procedure, you can request two
windows on the same SAS data set in one session. Some engines support this capability;
others do not.
The levels that are supported are record level and member (data set) level. Member-level
locking enables Read access to many sessions, statements, or procedures. This locking
restricts all other access to the SAS data set when a session, statement, or procedure
acquires update or output access. Record-level locking enables concurrent Read access
and Update access to the SAS data set by more than one session, statement, or
procedure. This locking prevents concurrent Update access to the same observation. Not
all engines support both levels.
By default, SAS provides the greatest possible level of concurrent access, while
guaranteeing the integrity of the data. In some cases, you might want to guarantee the
integrity of your data by controlling the levels of Update access yourself. Use the
CNTLLEV= data set option to control levels of locking. CNTLLEV= enables locking at
three levels:
library
data set
observation
Here are situations in which you should consider using the CNTLLEV= data set option:
Your application controls access to the data, such as in SAS Component Language
(SCL), SAS/IML software, or DATA step programming.
You access data through an interface engine that does not provide member-level
control of the data.
For more information about the CNTLLEV= data set option, see SAS Data Set Options:
Reference.
You can also acquire an exclusive lock on an existing SAS file by issuing the LOCK
global statement. After an exclusive lock is obtained, no other SAS session can read or
write to the file until the lock is released. For more information about the LOCK
statement, see SAS Statements: Reference.
Note: SAS products, such as SAS/ACCESS and SAS/SHARE, contain engines that
support enhanced session management services and file locking capabilities.
Indexing
A major processing feature of SAS is the ability to access observations by the values of
key variables with indexes. See “Understanding SAS Indexes” on page 638 for more
information about using indexes for SAS data files. Note that not all engines support
indexing.
Engine Characteristics 743
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.154.252