Using SAS Files |
What Are Data Sets? |
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 simply 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.
For more information, see SAS Data Files (Member Type DATA) and SAS Views (Member Type VIEW).
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 are the traditional SAS data sets familiar from previous versions 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 OpenVMS, indexes are stored as separate files but are treated as integral parts of the SAS data file by SAS.
Interface data files store data in files that have been formatted by other software and that only SAS can read. See The OSIRIS and SPSS Engines under OpenVMS for more information.
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 in other SAS data sets or in other vendors' files.
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, for example, a database management system. The ACCESS procedure in SAS/ACCESS software, for example, creates such a view.
What Are 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.
What Are Stored Program Files? |
Stored program files are compiled DATA steps generated by the Stored Program Facility. For details on the Stored Program Facility, see SAS Language Reference: Dictionary.
Stored program files have the SAS member type of PROGRAM.
What Are Access Descriptor Files? |
Access descriptor files describe the data formatted by other software products such as the Oracle database management system. Descriptor files created by the ACCESS procedure in SAS/ACCESS software have the SAS member type of ACCESS.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.