Common Types of SAS Files in UNIX Environments

SAS Data Sets

What Are SAS Data Sets?

Descriptor Information and Data Values

Data sets consist of descriptor information and data values organized as a table of rows and columns that can be processed by one of the engines. The descriptor information includes data set type, data set label, the names and labels of the columns in the data set, and so on. A SAS data set can also include indexes for one or more columns.
SAS data sets are implemented in two forms:
  • If the data values and the data set's descriptor information are stored in one file, the SAS data set is called a SAS data file.
  • If the file contains information about where to obtain a data set's data values and descriptor information, the SAS data set is called a SAS view.
The default engine processes the data set as if the data file or data view and the indexes were a single entity.

SAS Data Files (Member Type DATA)

The SAS data file is probably the most frequently used type of SAS file. These files have the extension .sas7bdat. SAS data files are created in the DATA step and by some SAS procedures. There are two types of data files:
  • Native data files store data values and their descriptor information in files formatted by SAS. These data files are the traditional SAS data sets from previous releases of SAS.
    Native SAS data files created by the default engine can be indexed. An index is an auxiliary file created in addition to the data file it indexes. The index provides fast access to observations within a SAS data file by a variable or key. Under UNIX, indexes are stored as separate files, but are treated as integral parts of the SAS data file by SAS.
    CAUTION:
    Do not remove index files using UNIX commands.
    Removing the index file can damage your SAS data set. Also, do not change its name or move it to a different directory. Use the DATASETS procedure to manage indexes.
  • Interface data files store data in files that have been formatted by other software and that SAS can read only. For more information, see Accessing BMDP, OSIRIS, or SPSS Files in UNIX Environments.

SAS Views (Member Type VIEW)

A SAS view contains only the information needed to derive the data values and the descriptor information. Depending on how the SAS view is created, the actual data can be located in other SAS data sets or in other vendors' files.
Views can be of two kinds:
  • Native SAS views contain information about data in one or more SAS data files or SAS views. This type of view is created with the SQL procedure or DATA step.
  • Interface SAS views contain information about data formatted by other software products such as a database management system. For example, the ACCESS procedure in SAS/ACCESS software creates an interface SAS view.

SAS Catalogs

Catalogs are a special type of SAS file that can contain multiple entries. Many different types of entries can be kept in the same SAS catalog. For example, catalogs can contain entries created by SAS/AF and SAS/FSP software, windowing applications, key definitions, SAS/GRAPH graphs, and so on.
Catalogs have the SAS member type of CATALOG.

Stored Program Files

Stored program files are compiled DATA steps. For information about the stored program files, see SAS Language Reference: Concepts.
Stored program files have the SAS member type of PROGRAM.

Access Descriptor Files

Access descriptor files describe the data formatted by other software products such as the Oracle or the Sybase database management systems. Descriptor files created by the ACCESS procedure in SAS/ACCESS software have the SAS member type of ACCESS.