Chapter 4: Using SAS Files


Introduction to SAS Files, Data Libraries, and Engines in UNIX Environments

What is a SAS File?

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 SAS by storing it, the operating system cannot process it because of the structure built into the file by SAS. 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.

How SAS Filenames Appear in Your Operating Environment

In SAS, you can create filenames using lowercase, uppercase, or mixed case. For example, valid data set names include: test1, TEST1, and Test1. However, when you view these files in your operating environment, the names will appear only in lowercase. For example, all of the previous data set names will appear as test1 in your operating environment.

What are Data Libraries?

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 are not managed by SAS. See Chapter 5, "Using External Files and Devices," on page 131 for how to access external files.) SAS stores temporary SAS files in a Work data library (see "Work Data Library" on page 120), which is automatically defined for you. You must specify a data library for each permanent SAS file.

What is a Libref?

SAS data libraries can be identified with librefs . A libref is a name by which you reference the directory in your application. For more information about how to assign a libref, see "Referring to SAS Data Files Using Librefs in UNIX Environments" on page 111.

What is an Engine?

SAS files and SAS data libraries are accessed through engines . An engine is set of routines that SAS must use to access the files in the data library. SAS 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 SAS which engine to use. For others, SAS automatically chooses the appropriate engine. The engine that is used to create a SAS data set determines the format of the file.

Additional Resources

For more information about SAS files, data libraries, and engines, see SAS Language Reference: Concepts .




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

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