Chapter Contents



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 and the ability to calculate observation numbers from record identifiers within the file.

Activities That Engines Regulate describes the types of activities that engines regulate.

Activities That Engines Regulate


Read/Write Activity

An engine can

For example, the engines that access BMDP, OSIRIS, or SPSS files support read-only processing. Some engines that access SAS data 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 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 SAS data sets support different levels at which update access is allowed. When a SAS data set can be opened concurrently by more than one SAS 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 supported are record level and member (data set) level. Member-level locking allows read access to many sessions, statements, or procedures, but restricts all other access to the SAS data set when a session, statement, or procedure acquires update access. Record-level locking allows concurrent read access and update access to the SAS data set by more than one session, statement, or procedure, but 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 possible, 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= allows locking at three levels:

Here are some situations in which you should consider using CNTLLEV=:

For more information on the CNTLLEV= data set option, refer to SAS Language Reference: Dictionary.

Note:   SAS software products, such as SAS/ACCESS and SAS/SHARE, contain engines that support enhanced session management services and file locking capabilities.  [cautionend]

Asynchronous I/O or Task Switching

The base SAS software engine and other engines are able to process several different tasks concurrently. For example, you may be entering statements into the Program Editor at the same time that PROC SORT is processing a large file. The reason that this is possible is that the engine allows task switching. Task switching is possible because the engine architecture supports the ability to start one task before another task is finished, or to handle work "asynchronously". This ability allows for greater efficiencies during processing and often results in faster processing time. Two system options, SYNCHIO and ASYNCHIO control this activity. For more information see the SAS Language Reference: Dictionary.


One major processing feature of the SAS data model is the ability to access observations by the values of key variables with indexes. See SAS Indexes for more information on using indexes in SAS data sets. Not all engines support indexing.

Chapter Contents



Top of Page

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