When using SAS in a Windows operating environment, you might want to specify a list of folders to be used as the SAS Work library. To do so, follow these steps.
- Locate your sasv9.cfg file:
SAS® 9.2 location: C:\Program Files\SAS\SASFoundation\9.2\nls\en\sasv9.cfg
SAS® 9.3 location: C:\Program Files\SASHome\SASFoundation\9.3\nls\en\sasv9.cfg
- Create a TXT file with a list of directories to be used as the new SAS Work libraries. The list should look similar to the following:
E:\SASWork
D:\SASWork
F:\SASWork
METHOD=RANDOM
The METHOD= line specifies which strategy SAS is to use for determining the location of the Work library.
There are two valid settings for the METHOD parameter:
METHOD=RANDOM
METHOD=SPACE
When METHOD=RANDOM is specified, SAS selects a location from the list at random, whereas with METHOD=SPACE, SAS selects the Work location from the list that has the most available free space.
- Update your sasv9.cfg file to show the location and filename of the TXT file that you just created. The line should look similar to the following:
–work “C:\SASWork\filename.txt”
For more information about dynamic allocation of the Work directory in SAS® 9.4 in a Windows operating environment, see SAS® 9.4 Companion for Windows - Fourth Edition.