|
scottwh@AMAZON.COM wrote:
>
>Hi folks,
>
>I was wondering if there was a way to pass a macro into another macro.
>For example, say I have the following macro:
>
>%macro select1();
> select count(apples) from sometable;
>%mend;
>
>%macro select2();
> select count(oranges) from sometable;
>%mend;
>
>
>%macro run_query(query)
>
> <Do stuff...>
>
> proc sql ....
> <Run the query macro here>
>
> <Do other stuff...>
>
>&mend;
>
>Then I could the same run_query macro with either of the select macros
>passed into it. Is this possible?
>
>Thanks,
>Scott
Umm, what are you trying to do here?
Are you trying to *pass* a macro into another macro, or are you
trying to pass a *parameter* to another macro, or are you
trying to add a parameter to a macro call to improve an old macro?
Try not to make things too complicated. That's not good for the
most important kind of efficiency: programmer efficiency. :-)
HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
It’s tax season, make sure to follow these few simple tips
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMMartagline
|