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.