Date: Fri, 15 Jan 2010 11:47:26 -0500
Reply-To: Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Subject: Re: 'IN' in macros
Content-Type: text/plain; charset="us-ascii"
From a Birdie (I.e., SAS Institute staff)
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of sas biology
Sent: Friday, January 15, 2010 9:46 AM
Subject: 'IN' in macros
How can I do this using Macros?
if a *in* (1 2 3) then b=a;
I can think of doing it in macros this way:
%if *&a=1 or &a=2 or &a=3* %then %do;
I am sure there must be a better way of doing it. Can someone spend some
time on this?
I specifically want to know how to avoid using 'OR' as in *&a=1 or &a=2 or
&a=3* and how to do it in a simple way.
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.