Chapter Contents

Previous

Next
SAS Companion for the Microsoft Windows Environment

Multiple Engine Architecture

All permanent and temporary SAS files are stored in SAS data libraries. To use a SAS data library in your SAS session, you must assign a libref (library reference) and an engine to the data library. The libref is the name you use to refer to the data library during a SAS session or job. You can programmatically define it with an environment variable or with the LIBNAME statement or function. For a complete explanation of librefs, see SAS Language Reference: Concepts. The SAS Explorer window provides an easy way to manage all of your SAS files, including librefs. For information about working with SAS files in the SAS Explorer window, see Getting Started with the SAS System. For information on using librefs in the Windows environment, see Using Data Libraries

A SAS data library is a collection of SAS files within a Windows folder or a concatenation of folders. Although the folder can contain files that are not managed by the SAS System, only SAS files are considered part of the SAS data library. Any Windows folder can be treated as a SAS data library.

Access methods called engines provide access to many formats of data, giving the SAS System a Multiple Engine Architecture. Engines apply only to SAS data sets.

The engine identifies the set of routines that the SAS System uses to access the files in the data library. With this architecture, data can reside in different types of files, including SAS data files and data formatted by other software products, such as database management systems. By using the appropriate engine for the file type, the SAS System can write to or read from the file. For some types of files, you need to tell the SAS System what engine to use. For others, SAS automatically chooses the appropriate engine. For more details about engines and Multiple Engine Architecture, see SAS Language Reference: Concepts.

Engines are of two basic types, library and view. Library engines control access at the SAS data library level and can be specified in the LIBNAME statement or function. View engines enable the SAS System 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. You cannot specify a view engine in the LIBNAME statement or function.


Library Engines

SAS has two types of library engines: native and interface. These engines support the SAS data 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: Dictionary. For examples of using library engines, see Using Data Libraries.

Native Library Engines

Native library engines are those engines that access forms of a SAS file created and maintained by the SAS System. Native library engines include the default engine, the compatibility engine, and the transport engine. Native Library Engines lists the acceptable names (and nicknames) for these engines.

Native Library Engines
Engine Names Description
default V8, BASE accesses 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
Release 6.03 and Release 6.04 compatibility V604 accesses data files created by Release 6.03 and Release 6.04
transport XPORT accesses transport files

When using the default engine, choose which name, V8 or BASE, that you use in your SAS jobs with an eye to the future. If your application is intended for Version 8 of the SAS System only, and you do not want to convert it to later releases, use the name V8. If, however, you plan to convert your application to new releases of the SAS System, 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; rather, it refers to the base, or primary, engine. The BASE engine can be used with more than the base SAS software product.

Note:   This book uses the term default engine to refer to the V8 engine. The V8 engine is the default engine for accessing SAS files under Version 8 of the SAS System unless the default engine is changed with the ENGINE system option. To see the value of the ENGINE system option, select

Tools
[arrow]
Options
[arrow]
System
to open the SAS System Options window. Then select

Files
[arrow]
SAS Files
The Engine system option displays the default engine for SAS data libraries.  [cautionend]

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. Interface Library Engines lists the interface engine names:

Interface Library Engines
Name Description
BMDP allows read-only access to BMDP files
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.

Rules for Determining the Engine

If you do not specify an engine name in a LIBNAME statement or function, the SAS System attempts to determine the engine (either the default or a compatibility engine) that should be assigned to the specified data library libref. Under Windows, the SAS System 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:

Note:   It is always more efficient to specify the engine name than to have the SAS System determine the correct engine.  [cautionend]

You can use the ENGINE system option to specify the default engine the SAS System uses when it detects a mixed mode library or a library with no SAS files. The valid values for the ENGINE option are V8, V7, V6, and BASE. By default, the ENGINE option is set to V8. For more information, see the system optionENGINE.


Chapter Contents

Previous

Next

Top of Page

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