Compiled by Prajitha Nair
The input parameter in the macro will be the name of the SAS file whose path is to be determined.
%macro PathbyName(progName);
%global fullPath fullPath1 engine;
%if %index(%upcase(&progName),.SAS) eq 0 %then
%let progName=&progName..sas;
proc sql noprint;
select xpath into :fullPath
from dictionary.extfiles where
index(upcase(xpath),"%upcase(&progName) " ) gt 0 ;
select setting into :engine from sashelp.voption
where optname="ENGINE";
quit;
%let engine = %trim(&engine);
%put engine = &engine;
%let fullpath = %trim(&fullPath);
%put fullpath = &fullPath;
%mend PathbyName;
No comments:
Post a Comment