WORK System Option: Windows

Specifies the pathname for the directory containing the Work data library.
Valid in: configuration file, SAS invocation
Category: Environment control: Files
PROC OPTIONS GROUP= ENVFILES
Default: !TEMP\SAS Temporary Files
Windows specifics: Valid values for library-specification
See: WORK= System Option in SAS System Options: Reference

Syntax

-WORK “library-specification

Required Argument

“library-specification”
specifies an environment variable or a Windows pathname. Remember that a pathname is only to the directory or subdirectory level. The value of library-specification must resolve to a valid Windows pathname. The library-specification must be enclosed in double quotation marks.

Details

The default SAS configuration file creates the Work data library in a folder named “SAS Temporary Files” located in your system's designated temporary area (as specified by the TEMP environment variable).
SAS creates a subdirectory called TDnnnnn for each SAS process under the directory that you specify in the WORK option, where nnnnn is a unique number.
If library-specification is a directory, then the work-data library will be stored in the directory. If library-specification is a file, then SAS will select a directory from the file to store the work-data library. The file must be a plain-text file. The following types of lines are valid in the file:
  • blank line, which are ignored
  • lines wrapped in C-style comments (/*...*/), which are ignored
  • lines that contain unquoted paths to a directory, only one path per line is allowed
  • lines that contain instructions on how to choose a path using the argument method=space or method=random. If there are multiple method= lines, only the last line is processed. If there are no method= lines in the file, then method=random will be processed.
    The error message, Library WORK does not exist is displayed for the following conditions:
    • the path does not exist
    • a path, not a directory, is specified for the argument.