21 %MACRO _stdPath(i_root
25 %IF %LENGTH(&i_root) = 0 %THEN %DO;
26 %PUT &g_error.(SASUNIT): i_root parameter must not be blank;
30 %LET i_root = %sysfunc(translate(&i_root,/,\));
32 %IF %LENGTH( %SYSFUNC(COMPRESS(&i_root,/)) ) = 0 %THEN %DO;
33 %PUT &g_error.(SASUNIT): i_root parameter must not be blank;
37 %IF
"%substr(&i_root,%length(&i_root),1)" NE
"/"
38 %THEN %LET i_root = &i_root/;
39 %LET i_path = %sysfunc(translate(&i_path,/,\));
40 %IF
"%substr(&i_path,%length(&i_path),1)" EQ
"/"
41 %THEN %LET i_path = %substr(&i_path,1,%eval(%length(&i_path)-1));
43 %IF %index(%upcase(&i_path)/, %upcase(&i_root)) %THEN %DO;
44 %IF %length (&i_path) > %length(&i_root) %THEN %DO;
45 %substr(&i_path,%eval(%length(&i_root)+1))