SAS_PROC SQL_Temporary files

Accepted Solution Solved
Reply
Contributor
Posts: 30
Accepted Solution

SAS_PROC SQL_Temporary files

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?


Accepted Solutions
Solution
‎04-16-2017 03:42 PM
Grand Advisor
Posts: 17,325

Re: SAS_PROC SQL_Temporary files

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


All Replies
Esteemed Advisor
Posts: 6,646

Re: SAS_PROC SQL_Temporary files

Use the -utilloc option, either in a config file or on the SAS commandline.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 30

Re: SAS_PROC SQL_Temporary files

how to use it?
Esteemed Advisor
Posts: 6,646

Re: SAS_PROC SQL_Temporary files


Khaladdin wrote:
how to use it?

I alreaady told you that. Which config file or shell script (commandline) depends on your SAS setup.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Grand Advisor
Posts: 17,325

Re: SAS_PROC SQL_Temporary files

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. 

Respected Advisor
Posts: 3,062

Re: SAS_PROC SQL_Temporary files

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;

 

Contributor
Posts: 30

Re: SAS_PROC SQL_Temporary files

I followed that link and it worked:

http://stats.idre.ucla.edu/sas/icu/customizing-sas-8-2/

Solution
‎04-16-2017 03:42 PM
Grand Advisor
Posts: 17,325

Re: SAS_PROC SQL_Temporary files

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.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 226 views
  • 1 like
  • 4 in conversation