Reputation: 2048
I have been going through SAS code written by others, which references a number of macros in folders around a large corporate network and I don't really know what many of these functions do. Is there a way of locating where SAS is finding the code for an individual function.
So if I put in a macro name for example rather than carrying out the instructions of the macro it would tell my the file path to where the code is located.
Thanks
Upvotes: 3
Views: 2209
Reputation: 12691
If you want to figure this out without actually running those macros, you can manually check the locations specified in SASAUTOS via:
%put %sysfunc(getoption(sasautos));
This won't help with %inc
's, locally defined (in the program) macros, macros set in the autoexecs, or stored compiled macros.
If you are looking for a way to automatically tell you which directory contains the relevant macro (presuming they are made available via sasautos) you could write a routine that checks each of the above folders using the answer given here as a starter for ten
Upvotes: 0
Reputation: 629
%include
statements that references external files with macroprograms.MAUTOLOCDISPLAY
should help to find from where your macro is readed and compiled.SASMSTORE
points to locations where your macros are compiled.Upvotes: 3
Reputation: 9569
Run option mautolocdisplay;
at the top of your code, before you run any macros. This should indicate in the log which autocall folder each one is compiled from.
This won't help for stored compiled macros or those compiled via %include
, but it's a start.
Upvotes: 2