SAS 9.1 Companion For Unix Enivronments

Automatically Defined Librefs

SAS automatically defines three librefs:

Sashelp

Sasuser

Work

These librefs and the LIBRARY libref are reserved librefs. If your site also has SAS/ GRAPH software or SAS/GIS software, the MAPS or GISMAPS librefs might also be automatically defined. All these libraries are described in SAS Language Reference: Dictionary . Sasuser and Work have operating system dependencies.

Sasuser Data Library

What is the Sasuser Library?

The Sasuser library contains the customizations (such as window size and positioning, colors, fonts, and printer entries) that you specified for your SAS session. When you invoke SAS, it looks for the Sasuser directory to find these customizations. If this directory does not exist, SAS uses the SASUSER system option to create it. The default directory is set in the system configuration file (sasv9.cfg) and is usually similar to the following:

-sasuser ~/sasuser.v91

This specification tells SAS to create a directory for the Sasuser libref in your home directory. To determine the value of this directory for your system, use PROC OPTIONS or libname sasuser LIST .

You can permit read-only access to the Sasuser library by using the RSASUSER system option. See Chapter 17, "System Options under UNIX," on page 311 for details on the SASUSER and RSASUSER system options.

After the Sasuser library has been created, SAS automatically assigns the same Sasuser libref to it each time you start a SAS session. It cannot be cleared or reassigned during a SAS session. If you delete the library, SAS re-creates it the next time you start a session. Because SAS assigns the libref for you, you do not need to use a LIBNAME statement before referencing this library.

Contents of the Sasuser Library

Your customizations are stored in one of the following locations in the Sasuser library:

Sasuser.Profile catalog

Sasuser.Registry catalog

Sasuser.Prefs file

These are three of the files that you can have in your Sasuser library. However, you can store other data sets and catalogs in the Sasuser library as well.

Work Data Library

The Work data library is the temporary library that is automatically defined by SAS at the beginning of each SAS session or job. The Work data library stores temporary SAS files that you create as well as files created internally by SAS.

To access files in the Work data library, simply specify a one-level name for the file. The libref Work is automatically assigned to these files unless you have assigned the User libref.

When you invoke SAS, it assigns the Work libref to a subdirectory of the directory specified in the WORK system option described in Chapter 17, "System Options under UNIX," on page 311. This subdirectory is usually named SAS_workcode_nodename where

code

nodename

This libref cannot be cleared or reassigned during a SAS session.

The WORKINIT and WORKTERM system options control the creation and deletion of the Work data library. See SAS Language Reference: Dictionary for details.

Note  

If a SAS session is terminated improperly (for example, using the kill -9 command), SAS will not delete the SAS_workcode_nodename directory. You might want to use the cleanwork command to delete these straggling directories (see Appendix 2, "Tools for the System Administrator," on page 399).

Категории