• When a SAS file is opened for output, it is created in the first library that is listed in
• When you delete or rename a SAS file, only the first occurrence of the file is
• Any time a list of SAS files is displayed, only one occurrence of a filename is
shown, even if the name occurs multiple times in the concatenation. For example, if
library One contains A.DATA and library Two contains A.DATA, only A.DATA
from library One is listed because it is the first occurrence of the filename.
In addition, a SAS file that is logically connected to another file (such as an index to
a data file) is listed only if the parent file is the first (or only) occurrence of the
filename. For example, if library One contains A.DATA and library Two contains
A.DATA and A.INDEX, only A.DATA from library One is listed. A.DATA and
A.INDEX from library Two are not listed.
• If any library in the concatenation is sequential, then the concatenated library is
considered sequential by applications that require random access. For example, the
DATASETS procedure cannot process sequential libraries, and therefore cannot
process a concatenated library that contains one or more sequential libraries.
• The attributes of the first library that is specified determine the attributes of the
concatenation. For example, if the first SAS library that is listed is “read only,” then
the entire concatenated library is “read only.”
• Once a libref has been assigned in a concatenation, any changes made to the libref
does not affect the concatenation.
• Changing a data set name to an existing name in the concatenation will fail.
Permanent and Temporary Libraries
SAS libraries are generally stored as permanent data libraries. However, SAS provides a
temporary or scratch library where you can store files for the duration of a SAS session
A permanent SAS library is one that resides on the external storage medium of your
computer and is not deleted when the SAS session terminates. Permanent SAS libraries
are stored until you delete them. The library is available for processing in subsequent
SAS sessions. When working with files in a permanent SAS library, you generally
specify a libref as the first part of a two-level SAS filename. The libref tells SAS where
to find or store the file.
Note: You can also skip using a libref and point directly to the file that you want to use,
using syntax that your operating system understands. An example of this in the
Windows environment is
Operating Environment Information
Files are specified differently in various operating environments. See the SAS
documentation for your operating environment for more information.
A temporary SAS library is one that exists only for the current SAS session or job. SAS
files that are created during the session or job are held in a special work space that might
or might not be an external storage medium. This work space is generally assigned the
default libref Work. Files in the temporary Work library can be used in any DATA step
or SAS procedure during the SAS session, but they are typically not available for
582 Chapter 24 • SAS Libraries