Chapter 24
SAS Libraries
Definition of a SAS Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Library Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Library Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Physical Names and Logical Names (Librefs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Assigning Librefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Associating and Clearing Logical Names (Librefs) with the
LIBNAME Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
Reserved Librefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Accessing Remote SAS Libraries on SAS/CONNECT, SAS/
SHARE, and WebDAV Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Library Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
Definition of Library Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
How SAS Concatenates Library Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
Rules for Library Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
Permanent and Temporary Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
Definition of a Metadata-Bound Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
SAS System Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
Introduction to SAS System Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
Work Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
User Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
Sashelp Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
Sasuser Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
Sequential Data Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
Tools for Managing Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
SAS Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
Library Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
Accessing Permanent SAS Files without a Libref . . . . . . . . . . . . . . . . . . . . . . . . . 587
Operating Environment Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
Definition of a SAS Library
The logical concept of a SAS library remains constant, regardless of the operating
environment. In any operating environment where SAS can be installed, the structure for
organizing, locating, and managing SAS files is the same.
575
At the operating environment level, however, a SAS library has different physical
implementations. Most SAS libraries implement the storage of files in a manner similar
to how the operating environment stores and accesses files.
For example, in directory-based operating environments, a SAS library is a group of
SAS files that are stored in the same directory and accessed by the same engine. Other
files can be stored in the directory, but only the files with file extensions that are
assigned by SAS are recognized as part of the SAS library. Under z/OS, a SAS library
can be implemented as either a bound library in a traditional OS data set or as a directory
under UNIX System Services.
SAS files can be any of the following file types:
SAS data set (SAS data file or SAS view)
SAS catalog
stored compiled SAS program
SAS utility file
access descriptors
multi-dimensional database files such as MDDB, FDB, and DMDB files
item store files
Figure 24.1 Types of Files in a SAS Library
Each SAS file, in turn, stores information in smaller units that are characteristic of the
SAS file type. For example, SAS data sets store information as variables and
observations, while SAS catalogs store information in units called entries. SAS
determines the type of a file from the context of the SAS program in which the file is
created or specified. Therefore, a library can contain files with the same name but with
different member types.
576 Chapter 24 SAS Libraries
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.4.174