ifly6
ifly6

Reputation: 5331

Where is the location of the SAS work folder?

I want to attach a SAS dataset in my work folder to an email. But copying that directly from the "Explorer" pane in SAS 9.4 does not work. How do I get SAS to print the SAS work folder's actual location on disc?

Upvotes: 0

Views: 3917

Answers (2)

data _null_
data _null_

Reputation: 9109

Here are a couple ways to assign to macro variables.

proc options option=(work);
   run;

%let workfolder=%sysfunc(pathname(WORK,L));
%put NOTE: &=workfolder;

%let %sysfunc(getoption(WORK,keyword));
%put NOTE: &=WORK;

Upvotes: 3

ifly6
ifly6

Reputation: 5331

The following prints the location of the work folder (usually multiple entries) from a SAS internal database.

proc sql;
    select path from dictionary.libnames
    where libname='WORK';
quit;

For my installation, this yields a location in C:\Users\USER_NAME\AppData\Local\Temp\SAS Temporary Files.

Upvotes: 2

Related Questions