Date: Sat, 19 Sep 2009 13:26:42 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Proc print with all the conditions
Kumar,
Why not just use one where and combine the conditions with ANDs. You could,
also, move the where up to the first line if desired.
E.g.,
proc print data=LangtangRes (where=(
abs(r)> 2 and
lev > .178571 and
cd > (4/56) and
abs(dffit)> (2*sqrt(4/56)) );
var ........... ;
run;
HTH,
Art
-----
On Sat, 19 Sep 2009 11:55:39 -0500, Kumar Mainali
<kpmainali@MAIL.UTEXAS.EDU> wrote:
>When I set multiple criteria for proc print, I want to see only the data
>points that satisfy ALL the conditions. However, the syntax below gives me
>unwanted data points. For instance, abs(r)>2 alone gives me cases with r
>more than 2 or less than -2 values. The four conditions give me all the
>cases that satisfy the conditions separately. So, it gives me a case that
>has r less than 2 if the case can satisfy any of the other condition. Any
>help appreciated.
>
>*proc* *print* data=LangtangRes;
>
> where abs(r)> *2*;
>
> where lev > *.178571*;
>
> where cd > (*4*/*56*);
>
> where abs(dffit)> (*2**sqrt(*4*/*56*));
>
> var ........... ;
>
>*run*;
>
>
>Thanks in advance,
>Kumar
|