18 %MACRO _sasunit_getAbsPathComponents (
 
   24    %LOCAL l_pathElementCount;
 
   25    %LOCAL l_fileNameStartPos;
 
   28    %LET &o_pathWithoutName=;
 
   30    %IF 
"%sysfunc(compress(&i_absPath))" NE 
"" %THEN %DO; 
 
   31       %IF %sysfunc(index(&i_absPath.,/)) GT 0 %THEN %DO; 
 
   32          %LET l_pathElementCount=%sysfunc(countw(&i_absPath.,/));
 
   33          %LET l_fileNameStartPos=%sysfunc(findw(&i_absPath.,%scan(&i_absPath,&l_pathElementCount,/)));
 
   34          %LET &o_pathWithoutName=%sysfunc(substr(&i_absPath.,1,%EVAL(&l_fileNameStartPos. - 2)));
 
   35          %LET &o_fileName = %sysfunc(substr(&i_absPath.,&l_fileNameStartPos.));
 
   38         %LET &o_fileName = &i_absPath;
 
   42 %MEND _sasunit_getAbsPathComponents;