Multiple Engine Architecture


SAS Data Libraries

All permanent and temporary SAS files are stored in SAS data libraries. A SAS data library is a collection of SAS data 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 data library. Any Windows folder can be treated as a SAS data library.

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 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 on using librefs in the Windows environment, see Using Data Libraries on page 125. 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 Multiple 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 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, 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 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 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 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: Concepts . For examples of using library engines, see Using Data Libraries on page 125.

Native Library Engines

Native library engines are those 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.

Table 4.2: Native Library Engines
 

Engine Names

Description

default

V9, BASE

accesses SAS System 9 and SAS 9.1 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 only read 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 with an eye to the future. If your application is intended for SAS 9.1 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; rather, 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.1 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

    Tools Options System

    to open the SAS System Options window. Then select

    Files SAS Files

    The Engine system option displays the default engine for SAS data 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:

Table 4.3: Interface Library Engines

Name

Description

BMDP

allowsread-only access toBMDPfiles ina 32-bitoperatingenvironment

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 on page 140 and ENGINE System Option on page 499.

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, this 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 on page 499.




SAS 9.1 Companion for Windows
SAS 9.1 Companion for Windows (2 Volumes)
ISBN: 1590472004
EAN: 2147483647
Year: 2004
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net