Date: Mon, 29 Jan 2007 23:00:51 -0800
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: Set problem
In-Reply-To: <5CA9E4A75962F64CA658FD81C05D6A01161B05@usuwamembx05.americas.astrazeneca.net>
Content-Type: text/plain; format=flowed
michael.ross@ASTRAZENECA.COM wrote:
>
>This code doesn't drop the y variable, when first conditon is true. Any
>suggestions?
>
>%let mem = 'XXXXXXXX';
>%let testds = 'XXXXXXXX', 'YYYYYYYY', 'ZZZZZZZZ';
>
>data a; x='First Condition True ' ;y='1'; run;
>data b; x='Second Condition True' ;y='1'; run;
>
>
>%macro testit;
>data test;
>if &mem in (&testds) then do;
> set a (drop=y);
>end;
>else do;
> set b;
>end;
>run;
>%mend testit;
>%testit;
Now that Toby et al. have explained what's going wrong with your code,
could you explain to me why you are trying to do this in the first place?
Specifically, could you provide a 'big picture' to put this in context?
HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
Valentine’s Day -- Shop for gifts that spell L-O-V-E at MSN Shopping
http://shopping.msn.com/content/shp/?ctId=8323,ptnrid=37,ptnrdata=24095&tcode=wlmtagline
|