Previous Page | Next Page

Using SAS Files

Work Library

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

To access files in the Work library, 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 System Options under UNIX. This subdirectory is usually named SAS_workcode_nodename , where:


is a 12-character code. The first four characters are randomly generated numbers. The next eight characters are based on the hexadecimal process identification number of the SAS session.


is the name of the UNIX computer where the SAS process is running.

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 library. See SAS Language Reference: Dictionary for information.

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 straggling directories (see Tools for the System Administrator).  [cautionend]

Previous Page | Next Page | Top of Page