Assign a specific folder location for each user that uses a custom Work location for SAS® Foundation


To assign a custom Work location for different users running SAS® Foundation and SAS® Enterprise Guide®, complete these steps for each user:

  1. On the Windows server where SAS is installed, go to the user's Windows profile and create a SASCFG directory where the custom configuration file will reside. Here is an example: c:\users\<user-id>\SASCFG
  2. In the SASCFG directory, right-click the empty space, select New, and select Text Document. Rename the file sasv9.cfg.
  3. Edit the new sasv9.cfg file to add the custom location where the user's Work files. Here is an example: -WORK "G:\TEMP_FOLDER"
    Close and save this file.
  4. Navigate to C:\Program Files\SASHome\SASFoundation\9.4\nls\en and edit the sasv9.cfg file. Scroll down to the end of the file and enter the following statement:

-config "%userprofile%\SASCFG\sasv9.cfg"

Close and save the file.

5. To validate that the new Work location has been set for the user, open SAS Foundation or SAS Enterprise Guide and run the following command:

proc options option=WORK value; run;


Note: If the "%userprofile%\SASCFG\sasv9.cfg" file does not exist, SAS opens and uses the default Work library, defined with the  -WORK option in your \nls\en\sasv9.cfg file. In this scenario, an error similar to the following occurs in the SAS log:
ERROR: Cannot open "C:\Users\<user-ID>\sascfg\sasv9.cfg"
The "cannot open" error is shown below several notes
If you want this user ID to use the default Work library from the \nls\en\sasv9.cfg file, then you can disregard the SAS error.