Date: Fri, 1 Oct 1999 01:31:34 +0100
Reply-To: John Whittington <John.W@MEDISCIENCE.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: John Whittington <John.W@MEDISCIENCE.CO.UK>
Subject: Re: Use of SUM function in data step WHERE clause
In-Reply-To: <199909302245.XAA01048@vicar.netnames.net>
Content-Type: text/plain; charset="us-ascii"
At 18:50 30/09/99 -0400, RODNEY PRESLEY wrote:
>This does not [work]:
>
>proc print data=test(where=(sum(of x1-x3)>80));
>run;
>
>ERROR: Syntax error while parsing
>WHERE clause.
>
>What am I missing? Why does the
>where clause support the SUM
>function in one form but not another?
>Thans for any insight.
... and nor, come to that, do either of the following work (same error
message):
proc print data=test ;
where (sum(of x1-x3)>80) ;
run;
proc print data=test ;
where (sum(of x1 x2 x3)>80) ;
run;
Rodney, you're 'missing' nothing, in the sense that what you report appears
to be the behaviour of SAS. It comes as a complete surprise to me, too. I
initially thought it might be due to the fact that the WHERE data set
option has to operate in a different fashion from a WHERE statement, but
the identical problem occurs with a WHERE statement.
Nor is the problem specific to the SUM() function; I've tried all sorts of
other functions which can, in themselves, accept a variable list as their
argument, and all show the same problem.
It makes no sense to me, even if it is 'documented' somewhere (I can't find
any mention in 6.12 documentation). Maybe someone else can throw some
light on this.
Regards,
John
----------------------------------------------------------------
Dr John Whittington, Voice: +44 (0) 1296 730225
Mediscience Services Fax: +44 (0) 1296 738893
Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk
Buckingham MK18 4EL, UK mediscience@compuserve.com
----------------------------------------------------------------