Date: Wed, 23 Sep 2009 10:43:10 -0700
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: Create data set if condition
In-Reply-To: A<A604EBA3F5657D479B8F62A2F0F0459C0B050F@SD01ITMV12.PROD.NET>
Content-Type: text/plain; charset="us-ascii"
Hi,
The only failure is due to the missing
semicolon to terminate the ATTRIB statement.
Also, sending nothing to nothing doesn't
really need to be coded. You can drop the
_null_ references, it is the equivalent.
e.g.
data outputa;
set outliers;
attrib &vara length=8;
informat=DOLLAR8. format=DOLLAR8.;
if &percenta > 0.2 then output outputa;
run;
Hope this is helpful.
Mark Terjeson
Investment Business Intelligence
Investment Management & Research
Russell Investments
253-439-2367
Russell
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Elmaache, Hamani
Sent: Wednesday, September 23, 2009 10:32 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Create data set if condition
Hi there.
I need some help.
I want to create dataset if the condition is satisfied, else don't
create at all a dataset. Here a code I wrote, but it doesn't work. Can
anyone correct this code below?
Thanks.
data outputa _NULL_ ;
set outliers;
attrib &vara length=8
informat=DOLLAR8. format=DOLLAR8. ;
if &percenta >0.2 then output outputa;
else output _NULL_ ;
run;