BookmarkSubscribeRSS Feed
wzimmerman
Fluorite | Level 6

Hello,

 

Is there a way to permanently change the WORK location from my C drive temp folder to another folder say on a shared drive? Or a different hard drive?

 

Cheers,

5 REPLIES 5
ballardw
Super User

What is the reason for wanting a different location for the work library? T

 

 

wzimmerman
Fluorite | Level 6

I am dealing with large data and the temporary files are eating up my HHD space to the point that I run out of space in some instances.

 

So my choices are (1) Buy a bigger HDD. (2) Change the WORK folder to a network that has the space. (3) Buy a server version of SAS which is very expensive.

 

Option 2 seems the easiest and cheapest by far if doable.

ballardw
Super User

If you have access to a network drive then create a permanent library there and just remember to use the LIBRARY.DATASET notation in code or point to the library as needed. If you can map a drive letter (Windoze) to the network location then creating the library is easy after mapping the drive letter:

 

libname mylib "X:\"; for example.

Just make sure that the drive and the library are available to your projects.

 

Note that network drives may have performance issues depending on traffic.

Ksharp
Super User

Before run you code , add this line .

Or you could add this line in AUTOEXEC file .

 

options user='d:\temp\';

 

 

 

Reeza
Super User

Note that you'll be giving up significant speed if you start working off of a network drive versus your local HD.  Especially if the files are big, you are effectively reading and writing a large amount of data across your network. 

 

Rather than a permanent setting, I would recommend using the user library option that @ksharp has recommended.

 

If you set up a library with the name user, SAS treats that as the WORK library instead of work, and you don't need to use a two level (libname.dataset) naming system.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3493 views
  • 2 likes
  • 4 in conversation