Date: Fri, 20 Apr 2007 18:32:28 -0700
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: A SIMPLE MACRO QUESTION FOR A BIGENNER
Content-Type: text/plain; format=flowed
>Wrote a Macro as below:
>%MACRO SELECT (varib, varibx, variby, pmm, three);
>Data pmm (drop = &varibx ongoing_&varib);
> if (on_&varib + &varibx) > '1' then &variby = 'Yes';
> else &variby = 'No';
>%SELECT(all, alle, allf)
>%SELECT(card, med, dio)
>%SELECT(derm, med, tro)
>Can you please tell me why this MACRO is only giving the the results with
>- (derm, med, tro)? It is not picking up (all, alle, allf) and
>(card, med, dio).
>How can I fix it? What would bet he right code?
>Thanks a lot.
It can be complicated to learn SAS macro programming.
It can be *really* complicated to learn it if you don't know enough SAS yet.
Since *you* are describing yourself as a beginner, may I suggest that you
just not write this as a macro? Learn how to do this in a data step or
Then learn how to use arrays to do the same sorts of tasks. Because your
will be a lot simpler if you don't try to dive headfirst into a macro pool
unknown depth.. at least not until you learn how to check that the pool
is deep enough first.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Interest Rates NEAR 39yr LOWS! $430,000 Mortgage for $1,299/mo - Calculate