LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 Jun 2006 16:01:44 -0400
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: macro call as a parameter of another macro ?
Comments: To: Toby Dunn <tobydunn@HOTMAIL.COM>

On Tue, 6 Jun 2006 19:46:15 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote:

>Ya , > >These two sentences contradict one another: > >>>The ideal scenarios is that I have one main macro %task, >>>and it will call many other macros which users don't have to >>>know about. There are many parameters to control the different >>>part inside %task. > >You cant have your cake and eat it too, as it were. In other words you cant >have a macro that calls other macro(s) where the called macro(s) parameters >are values passed on by the Calling macro, and have the user not need to >know atleast something about the macro(s) which are called inside of the >calling macro. >

%macro task(a=,b=,c=,d=,e=); ... %m1 .. %m2

%getds(.....) %getds(.....) .. %getds(.....) ...

%m3

%mend task;

For most of the macro being called by %task, they get the parameter from &a, &b, &c.... In this sense, %m1, %m2 etc. really don't have to be macros. I made them macro, just so that I can focus on each module when debugging. %getds is the only macro that need some parameters pass in by %task.

Since # of %getds calls is unknown, I can't make them to the %taks parameters.

Ya


Back to: Top of message | Previous page | Main SAS-L page