SAS view
is a virtual data set that points to data from other sources. SAS views have a member
type of VIEW. For specific information, see Chapter 29, “SAS Views,” on page
675.
Note: The term SAS data set is used when a SAS view and a SAS data file can be used
in the same manner.
Descriptor Information for a SAS Data Set
The descriptor information for a SAS data set makes the file self-documenting. That is,
each data set can supply the attributes of the data set and of its variables. Once the data is
in the form of a SAS data set, you do not have to specify the attributes of the data set or
the variables in your program statements. SAS obtains the information directly from the
data set.
Descriptor information includes the number of observations, the observation length, the
date that the data set was last modified, and other facts. Descriptor information for
individual variables includes attributes such as name, type, length, format, label, and
whether the variable is indexed.
The following figure illustrates the logical components of a SAS data set:
602 Chapter 27 SAS Data Sets
Figure 27.1 Logical Components of a SAS Data Set
The following items correspond to the numbers in the figure above:
1. A SAS view (member type VIEW) contains descriptor information and uses data
values from one or more data sets.
2. A SAS data file (member type DATA) contains descriptor information and data
values. SAS data sets can be a member type DATA (SAS data file) or VIEW (SAS
view).
3. An index is a separate file that you can create for a SAS data file in order to provide
direct access to specific observations. The index file has the same name as its data
file and a member type of INDEX. Indexes can provide faster access to specific
observations, particularly when you have a large data set.
4. Extended attributes are metadata that is defined on a data set or on a variable
(column). Extended attributes are represented as name-value pairs and are created
using the DATASETS procedure.
Descriptor Information for a SAS Data Set 603

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.