An Idea Exchange for SAS software and services

by Super User
on ‎08-27-2015 05:24 PM

I've implanted similar within critical macros. If you have a big enough shop that you have folks writing macros for others then this could be a standard part of your macro writing code.

Something like:

%macro dummy(var1=, var2=);

%put Parameters passed to Dummy: var1=&var1 | var2=&var2 ;

Doesn't actually add much coding time.

by PROC Star
on ‎08-27-2015 09:25 PM

Yeah, I've done that sort of thing.  Or even just %put _local_ as a quickie.

But I still would prefer the system option because:

  • For macros that have parameters with default values, seeing the list of all parameter values is not the same as seeing the list of parameters that were passed.  If somebody calls a macro like %MyMac() they haven't passed any parameter values, even if the macro has 10 parameters.  I would want to see the actual macro call.
    • If I see %MyMac(data=mydata) in my log, I know it's a pretty standard use of %MyMac that accepts all the default values.  If I see %MyMac(data=mydata, var=_numeric_, age=5, method=force, ErrorCheck=No, MoonCycle=Full), I know it's a more specialized use. 
    • If the log shows the actual macro call, %MyMac(data=mydata), rather than just a list of parameters, I can review it and confirm "yes, I've got the correct macro invocation."  Useful with CALL EXECUTE, or other settings where macro calls are generated rather than typed, such as an indirect macro call like  %&SomeMacro.
  • Even in small shops / non-critical macros, we all inherit code (from others or from our prior selves), sometimes for only short periods of time (vacation coverage or whatever).  Just for log traceability/readability I would like to be able to turn on MINVOCATION without mucking about with all of the macro definitions.
by PROC Star
on ‎09-09-2015 03:07 AM

Even better, this should be added to the MPRINT output.

Likewise, the path the macro was retrieved from would be useful to be displayed at the same tine.


Idea Statuses
Top Liked Authors