Date: Tue, 9 Sep 2008 10:21:35 -0400
Reply-To: "Lanoue, Jacques" <JLanoue@MANNKINDCORP.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Lanoue, Jacques" <JLanoue@MANNKINDCORP.COM>
Subject: Re: KEEP DROP array variables
In-Reply-To: A<00d02819-2913-495a-bced-73793cc53745@z66g2000hsc.googlegroups.com>
Content-Type: text/plain; charset="US-ASCII"
Dear all,
Please remember that Keep and Drop statements are no functions.
They can't be called like one;
Those two example should produce the same result;
data Mydata;
a=1;
Todrop=2;
Run;
Data test1;
set MyData;
if 0=1 then do;
Drop todrop;
end;
Run;
Data test2;
set MyData;
Drop todrop;
Run;
Thanks,
Jacques Lanoue
Phone: (201) 983-5034
BlackBerry: (203) 224-0663
Fax: (201) 450-9982
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Akshaya
Sent: Tuesday, September 09, 2008 10:10 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: KEEP DROP array variables
Hi,
do i=1 to 6651;
if (snps[i] = "DD") then do;
call symput('keep',vname(snps[i])); /* Assign the
variable name which satisfies the condition to a MV /*
keep &keep;
end;
end;
Thanks!
Akshaya
|