Loading Data : Assigning Librefs to Data
The SAS System requires that data
stored in a SAS library or
a specific SAS data set in a SAS library must have a libref (library
reference) assigned to it. A libref is an arbitrary name that you make up
to symbolically represent a SAS library. The SAS System uses a libref to
associate a SAS library with its physical location.
The SAS System automatically provides the librefs SASUSER
and WORK. SASUSER is for permanent SAS data sets; WORK is for temporary SAS
data sets that are discarded at the end of a SAS session. You must assign
librefs for any data library other than the libraries associated with SASUSER
and WORK.
To
assign a libref, issue the LIBNAME statement. You must assign a libref outside SAS/SPECTRAVIEW,
for example, from the SAS PROGRAM EDITOR window.
The most common form of the LIBNAME statement contains only the libref and
the physical location for the SAS library, for example:
libname mylib 'mypath';
Note:
You can include LIBNAME statements in
an autoexec file, which is an external file containing SAS statements that
are executed automatically when the SAS System is invoked. Then each time
you bring up the SAS System, your librefs are automatically assigned. ![[cautend]](../common/images/cautend.gif)
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.