Multi Engine Architecture

SAS Libraries

All permanent and temporary SAS files are stored in SAS libraries. A SAS library is a collection of SAS files that are stored in a physical location under the operating system. Although the physical location in the operating system can contain files that are not managed by SAS, only SAS files are considered part of the SAS library. Any Windows folder can be treated as a SAS library.
To use a SAS library in your SAS session, you must assign a libref (library reference) and an engine to the library. The libref is the name that you use to refer to the data library during a SAS session or job. You can create a libref from the Explorer window or you can programmatically define it with an environment variable or with the LIBNAME statement or function. For information about using librefs in the Windows environment, see Using Data Libraries. For a complete explanation of librefs, see SAS Language Reference: Concepts.
The Explorer window provides an easy way to manage all of your SAS files, including librefs. For information about working with SAS files in the Explorer window, see the SAS Help and Documentation.

SAS Engines

What Is an Engine?

Engines, also called access methods, provide access to many formats of data, giving SAS a Multi Engine Architecture. Engines apply only to SAS data sets.
The engine identifies the set of routines that SAS uses to access the files in the library. With this architecture, data can reside in different types of files, including SAS files and data formatted by other software products, such as database management systems. By using the appropriate engine for the file type, SAS can write to or read from the file. For some types of files, you need to tell SAS what engine to use. For others, SAS automatically chooses the appropriate engine. For more details about engines and Multi Engine Architecture, see SAS Language Reference: Concepts.
Engines are of two basic types, library and view. Library engines control access at the SAS library level and can be specified in the LIBNAME statement or function. View engines enable SAS to read SAS data views described by the DATA step, SQL procedure, or SAS/ACCESS software. The use of SAS view engines is automatic because the name of the view engine is stored as part of the descriptor portion of the SAS data set.

Types of Library Engines

SAS has two types of library engines: native and interface. These engines support the SAS library model. Library engines perform several important functions, including determining fundamental processing characteristics. For a more detailed description of library engines, see SAS Language Reference: Concepts. For examples of using library engines, see Using Data Libraries.

Native Library Engines

Native library engines are engines that access forms of a SAS file created and maintained by SAS. Native library engines include the default engine, the compatibility engine, and the transport engine. The following table lists the acceptable names (and nicknames) for these engines.
Native Library Engines
Engine Type
Engine Names
Description
default
V9, BASE
accesses SAS System 9, 9.1, 9.2 and SAS 9.3 data files
Version 8 compatibility
V8
accesses the Version 8 data files
Version 7 compatibility
V7
accesses Version 7 data files
Release 6 compatibility
V6
accesses any data file created by Release 6.08 through Release 6.12. In 64-bit environments, the V6 engine can read only data.
Release 6.12 compatibility
V612
accesses Release 6.12 data files
Release 6.03 and Release 6.04 compatibility
V604
read-only access to data files created by Release 6.03 and Release 6.04
transport
XPORT
accesses transport files
When using the default engine, choose which name, V9 or BASE, that you use in your SAS jobs considering future releases. If your application is intended for SAS 9.3 only, and you do not want to convert it to later releases, use the name V9. If, however, you plan to convert your application to new releases of SAS, use the name BASE because that refers to the latest default engine. Using the name BASE makes your programs easy to convert. The engine name BASE does not refer to Base SAS software; it refers to the base, or primary, engine. The BASE engine can be used with more than the Base SAS software product.
This document uses the term default engine to refer to the V9 engine. The V9 engine is the default engine for accessing SAS files under SAS 9.3 unless the default engine is changed with the ENGINE system option. To see the value of the ENGINE system option, do one of the following:
  • Submit
    proc options option=engine;
    run;
  • select Toolsthen selectOptionsthen selectSystem to open the System Options window. Then select Filesthen selectSAS Files. The ENGINE system option displays the default engine for SAS libraries.

Interface Library Engines

Interface library engines support access to other vendors' files. These engines allow read-only access to BMDP, OSIRIS, and SPSS files. You must specify as part of the LIBNAME statement or function the name of the interface library engine that you want. The following table lists the interface engine names:
Interface Library Engines
Name
Description
BMDP
allows read-only access to BMDP files in a 32-bit operating environment
OSIRIS
allows read-only access to OSIRIS files
SPSS
allows read-only access to SPSS files
For more information about these engines, see Reading BMDP, OSIRIS, and SPSS Files and ENGINE System Option: Windows.

Rules for Determining the Engine

If you do not specify an engine name in a LIBNAME statement or function, SAS attempts to determine the engine (either the default or a compatibility engine) that should be assigned to the specified data library libref. Under Windows, SAS looks at the file extensions that exist in the given folder and uses the following rules to determine which engine should be assigned to the libref:
  • If the folder contains SAS data sets from only one of the supported native library engines (not including XPORT), the libref is assigned to that engine.
  • If there are no SAS data sets in the given folder, the libref is assigned to the default engine.
  • If the folder contains SAS data sets from more than one engine, it is called a mixed mode library. The libref is then assigned to the default engine. A message is printed in the SAS log informing you the libref is assigned to a mixed mode library.
Note: It is always more efficient to specify the engine name than to have SAS determine the correct engine.
You can use the ENGINE system option to specify the default engine that SAS uses when it detects a mixed mode library or a library with no SAS files. By default, the ENGINE option is set to V9. For more information, see ENGINE System Option: Windows.