Hi,
I need to find the filerefs' or the directory location, that are assigned to option sasautos for the sas session thats already executing.
Please let know if there is any option or macro statement to find that.
Regards,
Moovendhan Devaraj
do you just want to see the list?
*list directory specifications in sasautos;
*list values of environment variables;
*sasroot is your installation folder;
%put %sysget(sasroot);
*environment variable references are preceeded by bang (!);
%put %cmpres(%sysget(sasautos));
*instantiate fileref sasautos;
%include sasautos(af)/nosource2;
filename sasautos list;
*check the option;
*is autocall option true? false::NoMautosource;
%put %sysfunc(getoption(mautosource));
proc options define value option=mautosource;
*what are the filerefs to search see getoption above.
%put %sysfunc(getoption(sasautos)));
proc options define value option=sasautos;
*get list;
proc sql; describe table dictionary.extfiles;
*create table list_filerefs_sasautos as;
select * from dictionary.extfiles
where fileref eq 'SASAUTOS';
quit;
*the pair for compiled and stored macros is;
%put %sysfunc(getoption(mstored));
%put %sysfunc(getoption(sasmstore));
Here are some pages with background information.
http://www.sascommunity.org/wiki/SASautos_Companion_Reusing_Macros
Check dictionary EXTFILES
proc sql;
select *
from dictionary.EXTFILES ;
quit;
The GETOPTION() function can return the value of an option. You can use %SYSFUNC() to call it with macro code.
%put %sysfunc(getoption(sasautos)) ;
If you see that there are FILEREFS used then you can use the PATHNAME() function to get the path(s) that the filerefs refer to.
%put %sysfunc(pathname(sasautos));
Thank you all, All the replies helped
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.