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 (September 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 25 Sep 2006 11:19:41 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: how to tell SAS to ignore macro option
Comments: To: SAS_learner <proccontents@GMAIL.COM>
In-Reply-To:  <c2192a610609251102p72fd9421k67be0a7e35854966@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

SAS_Learner -

One answer is to put the whole condition into your macro call so &reg resolves to a blank for all regions and " and reg='reg_val' " for the individual regions.

hth

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS_learner Sent: Monday, September 25, 2006 11:02 AM To: SAS-L@LISTSERV.UGA.EDU Subject: how to tell SAS to ignore macro option

hello guys,

I using a piece of code where I am doing same thing for two different conditions. First I calculating totals for my header for all regions and then I am doing same thing for different regions, As of now my code for

for all regions

proc sort data = HEADER(where =(&population = '1' )) out= V_AE(KEEP= PT TREAT_R ) nodupkey; by PT TREAT_R; run; .......... ..........

for different regions I am doing like this

%macro region(reg = ); proc sort data = HEADER(where =(&population = '1' and &reg = )) out= V_AE(KEEP= PT TREAT_R ) nodupkey; by PT TREAT_R; run; ....... ............ %mend; and I am calling this macro using

Data _Null_ ; Set temp; Call Execute( '%nrstr( %region ( reg = '|| REGION||, 'nam = '||reg|| '))' ) ; Run ;

what I want to do is there way to tell SAS that if I do not supply anything to the region then it should ignore the region and calculate for all the regions like the code for the all regions other wise it has to do for individual regions

thanks


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