Hi. Can someone help me with code to re-direct the path for the SAS Temp Folder. I believe its currently in 'c' drive but I'd like to direct SAS to use an external drive to process and store the temp files. Any help would be greatly appreciated.
It is the -work option in the config file.
Where you find that config file depends on the type of your SAS setup. (Desktop, BI Server, ...)
This is possible but the approach may depend on how you run SAS as it requires changes to the initialization of the program and cannot be changed after SAS is started.
If you are running a standalone base SAS Display manager session you will need to find the configuration file which is likely to reside in someplace like
exact path will vary by version
You are looking for sasv9.cfg
Look for the -WORK line and change it to read similar to
where Path is a fully qualified system path (starts with a Drive letter in windows, or your mount point in others)
If your IT folks have locked down the Program files folder as in my organization you may not be able to save the config file in its current location. If that is the case then save it some where you control and then change or copy of the program icon to have the -CONFIG option point to your version. If your program icon doesn't then add -CONFIG "Pathtoconfig\sasvg.cfg" or what ever the path and name of the saved version you created.
If you have batch jobs you will need to make sure that the -CONFIG used in the command like uses the desired config file.
Other installs, I'm not sure of as I don't work in a server environment and more admin types may be involved.
I would assume you are using local SAS 9.1+ (not server version), and you have access to your local SAS folder.
1. Locate sasv9.cfg
you can just simply search it using OS or right click SAS icon check on properties, you may see something like:
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg"
, that tells you where to locate the config file sasv9.cfg
2. Using text editor (e.g. notebook) open it and look for :-WORK “c:\whatever\”, then change it to where you want to route your temp file. Save the config file. restart SAS.
found it. Its currently -Work "!Temp\SAS Temporary Files" If I am wanting it to be changed to an external drive would I enter the code as follows: -Work "J:\extDrive\bigdata" Exactly like that?
Yes. And once that change is made, it will stay active until you change it back.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.