The code below will give you the path of all the directories containing macros in the SASAUTOS in your SAS-session.
%put %sysfunc(getoption(sasautos)); filename _all_ list;
The code below will give you the path of all the directories containing macros in the SASAUTOS in your SAS-session.
%put %sysfunc(getoption(sasautos)); filename _all_ list;
From SAS9.2 it’s possible to add a path to eg SASAUTOS. It’s done using ‘insert’ or ‘append’.
Read more about append and insert.
options insert=(sasautos=&
If you get a strange error, that insert isn’t recognized or something like that. The error might be caused because there’s spaces in the path, that your trying to insert.
/* Gets path for the SAS-program being executed */
%macro GetSASProgramPath;
%qsubstr(%sysget(SAS_
%mend;
%let SASProgramPath = %GetSASProgramPath;
This will only work on Windows.
In batchmode you can get the programname with the code below. This will work in eg an AIX environment.
%let ProgramName = %sysfunc(getoption(sysin));
%put &ProgramName;