membertype
is assigned by SAS. The member type is DATA for SAS data files and VIEW for
SAS views.
When you refer to SAS data sets in your program statements, use a one- or two-level
name. You can use a one-level name when the data set is in the temporary library Work.
In addition, if the reserved libref User is assigned, you can use a one-level name when
the data set is in the permanent library User. Use a two-level name when the data set is in
some other permanent library that you have established. A two-level name consists of
both the libref and the data set name. A one-level name consists of just the data set
name.
Two-level SAS Data Set Names
The form most commonly used to create, read, or write to SAS data sets in permanent
SAS libraries is the two-level name as shown here:
libref.SAS-data-set
When you create a new SAS data set, the libref indicates where it is to be stored. When
you reference an existing data set, the libref tells SAS where to find it. The following
examples show the use of two-level names in SAS statements:
data revenue.sales;
proc sort data=revenue.sales;
One-level SAS Data Set Names
You can omit the libref, and refer to data sets with a one-level name in the following
form:
SAS-data-set
Data sets with one-level names are automatically assigned to one of two SAS libraries:
Work or User. Most commonly, they are assigned to the temporary library Work and are
deleted at the end of a SAS job or session. If you have associated the libref User with a
SAS library or used the USER= system option to set the User library, data sets with one-
level names are stored in that library. See Chapter 24, “SAS Libraries,” on page 575 for
more information about using the User and Work libraries. The following examples
show how one-level names are used in SAS statements.
/* create perm data set in location of USER=option*/
options user='c: emp'
data test3;
/* create perm data set in current directory */
data 'test3';
/* create a temp data set in WORK directory if USER= is not specified*/
data stratifiedsample1;
Data Set Names 595