01-12-2017 01:10 PM
I am running sas 9.4 on grid platform. I want to get the value of the path of my sas program automatically in sas. I use the below code but it gives me the sas workspace location and not my user directory where my program is saved. Any ideas?
%put The current program is %sysfunc(getoption(sysin));
insted of this I want path of my directory where abc.sas is actually saved.
01-12-2017 01:21 PM
This may work:
It is the result of a macro function so could be used as:
title "Program name: %sysget(SAS_EXECFILEPATH)";
%let File = %sysget(SAS_EXECFILEPATH);
It returns the path and name after a file is saved in base SAS. I don't know if it will work in a grid environment.