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

Hi all,

I need to use PROC.SQL statements for my analysis. The problem is, SAS uses C disk in order to create temporary files when I use SQL statements. My datasets are very large and I do not have enough space for that. Could you please explain me how to allocate this temporary file in other place rather than C disk?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Note that the solution you've linked to is a permanent change for where your WORK directory is stored. If that post answered your question, please mark it as the solution.

View solution in original post

7 REPLIES 7
Khaladdin
Quartz | Level 8
how to use it?
Reeza
Super User

The C drive is used when you're either

1. Accessing a DBMS but using functions that are not supported on the DBMS

2. Using data both in SAS and on the server - the data is then brought down the server to be processed. 

3. All your data is local. 

 

Identify which situation you're in first. 

If #3, there aren't any workarounds. 

If its 1/2 you can modify your query so that it's processed on the server instead. 

SASKiwi
PROC Star

One workaround is to compress your SAS datasets at the expense of slowing your programs down a bit. Put this at the start of your program. If you are lucky it might give you enough space to complete your job successfully. At the end of the day you may still need to put another hard drive in your PC. Warning - don't write SAS temporary files to a network drive unless you want your programs to run forever and seriously annoy IT administrators.

 

options compress = binary;

 

Reeza
Super User

Note that the solution you've linked to is a permanent change for where your WORK directory is stored. If that post answered your question, please mark it as the solution.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 7 replies
  • 2326 views
  • 1 like
  • 4 in conversation