BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SannaSanna
Quartz | Level 8

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
SannaSanna
Quartz | Level 8
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?

View solution in original post

7 REPLIES 7
Kurt_Bremser
Super User

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, ...)

SannaSanna
Quartz | Level 8

Its a laptop and the conf file file is in my program files folder.   Its runniing SAS 9.4

ballardw
Super User

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

C:\Program Files\SASHome2\SASFoundation\9.4\nls\en

exact path will vary by version

You are looking for sasv9.cfg

Look for the -WORK line and change it to read similar to

 

-WORK= "Path\Folder"

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.

Haikuo
Onyx | Level 15

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.

SannaSanna
Quartz | Level 8
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?
Kurt_Bremser
Super User

@SannaSanna wrote:
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.

SannaSanna
Quartz | Level 8
Also, would I need to change back or would it automatically default back to its original path after shutting down?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2084 views
  • 3 likes
  • 4 in conversation