| SAS Companion for the OS/2 Environment |
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 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 OS/2 environment, see
Using Data Libraries.
Note:
Version 7 introduces a new feature for the OS/2 platform that eliminates the need for a
LIBNAME statement. Instead, you may directly specify the drive name and the data set name in quotes. An example follows:
data "d:\a";
A SAS data library is a collection of SAS files within an OS/2 directory
or a concatenation of directories. Although the directory can contain files that are not managed by the SAS System, only SAS files are considered part of the SAS data library. Any
OS/2 directory 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 on 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.
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 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.
When using the default engine, choose which name, V7 or BASE, that you use in your SAS jobs with an eye to the future. If your application is intended for Version 7 of the SAS System only, and you do
not want to convert it to later releases, use the name V7. 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 nickname 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 V7 engine. The V7 engine is the default engine for accessing SAS files under Version 7 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]](../common/images/arrow.gif) |
Options |
![[arrow]](../common/images/arrow.gif) |
System |
to
open the SAS System Options window. Then select Files and SAS Files folders. The Engine system option displays the default engine for SAS data
libraries.
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:
For more information on these engines, see
Reading BMDP, OSIRIS and SPSS Files.
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 OS/2, the SAS System looks at the file extensions that exist in the given directory 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.
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 system option are V7, V6, and BASE. By default, the ENGINE option is set to V7. For
more information, see the system option in ENGINE.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.