Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Introduction to SAS Files, Data Libraries, and Engines

Your data can reside in different types of files, including SAS files and files that are formatted by other software products, such as database management systems. Under UNIX, a SAS file is a specially structured UNIX file. Although the UNIX operating environment manages the file for the SAS System by storing it, the operating system cannot process it because of the structure built into the file by the SAS System. For example, you can list the filename with the ls command, but you cannot use the vi editor to edit the file. A SAS file can be permanent or temporary.

SAS files are stored in SAS data libraries. A SAS data library is a collection of SAS files within a UNIX directory. Any UNIX directory can be used as a SAS data library. (The directory can also contain files called external files that not managed by the SAS System. See Using External Files and Devices for how to access external files.) The SAS System stores temporary SAS files in a WORK data library (see WORK Data Library), which is automatically defined for you. You must specify a data library for each permanent SAS file.

SAS files and SAS data libraries are accessed through engines. An engine is set of routines that the SAS System must use to access the files in the data library. The SAS System can read from and, in some cases, write to the file by using the engine that is appropriate for that file type. For some file types, you need to tell the SAS System which engine to use. For others, the SAS System automatically chooses the appropriate engine. The engine that is used to create a SAS data set determines the format of the file.

SAS data libraries can be identified with librefs. A libref is a name by which you reference the file in your application. You can assign librefs by using the LIBNAME statement, by defining an environment variable, or through the New Library window.


Chapter Contents

Previous

Next

Top of Page

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