UCLA Academic Technology Services HomeServicesClassesContactJobs

SAS FAQ
How do I  locate the SAS temporary work directory?

Sometimes, you might need to know the path to the temporary work directory that SAS uses. There are at least two ways to do it.

First method is via point-and-click in Windows environment. Right click on the icon of work in SAS and choose "Property". It will show something as follows.

The point-and-click method might be good enough for a lot of users. But what if we want to pass this information to a SAS program or what if we are not in Windows environment? Here is how to do it via syntax. Notice that the code is not case-sensitive.

%put %sysfunc(getoption(work));

1    %put %sysfunc(getoption(work));
c:\saswork\_TD308

We can also create a macro variable to store the location for future use.

%let a = %sysfunc(getoption(work));
%put &a;
3    %let a = %sysfunc(getoption(work));
4    %put &a;
c:\saswork\_TD308

For more information on using sas macro function %sysfunc, visit SAS's page on %SYSFUNC and %QSYSFUNC Functions


How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.