BookmarkSubscribeRSS Feed
DMoovendhan
Quartz | Level 8

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

4 REPLIES 4
Ron_MacroMaven
Lapis Lazuli | Level 10

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

Listing Macros in SASautos - sasCommunity

Ksharp
Super User

Check dictionary EXTFILES

proc sql;

select *

from dictionary.EXTFILES ;

quit;

Tom
Super User Tom
Super User

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));

DMoovendhan
Quartz | Level 8

Thank you all, All the replies helped

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1367 views
  • 3 likes
  • 4 in conversation