⨳ Current file path ⨳

October 29, 2014

Sometimes I need to reference the path of the current (saved) file. Thanks to a stack overflow post, I can easily do that.

%let filepath=%substr(%sysget(SAS_EXECFILEPATH),1,
  %eval(%length(%sysget(SAS_EXECFILEPATH))-%length(%sysget(SAS_EXECFILENAME))));
%put &FILEPATH;

Current file path - October 29, 2014 -