SAS data sets can have a one-level name or a two-level
name. Typically, names of temporary SAS data sets have only one level
and are stored in the WORK library. The WORK library is defined automatically
at the beginning of the SAS session and is deleted automatically at
the end of the SAS session. Procedures assume that SAS data sets that
are specified with a one-level name are to be read from or written
to the WORK library. To indicate otherwise, you specify a USER library
(see
USER Library). For example, the following PROC PRINT steps are equivalent.
The second PROC PRINT step assumes that the DEBATE data set is in
the WORK library.
proc print data=work.debate;
run;
proc print data=debate;
run;
The SAS system options
WORK=, WORKINIT, and WORKTERM affect how you work with temporary and
permanent libraries. For more information, see
SAS System Options: Reference.
Typically, two-level
names represent permanent SAS data sets. A two-level name takes the
form
libref.SAS-data-set. The
libref is a name that is temporarily associated
with a SAS library. A SAS library is an external storage location
that stores SAS data sets in your operating environment. A LIBNAME
statement associates the libref with the SAS library. In the following
PROC PRINT step, PROCLIB is the libref and EMP is the SAS data set
within the library:
libname proclib 'SAS-library';
proc print data=proclib.emp;
run;