Date: Tue, 23 Sep 2003 01:41:08 +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: FIRST. and LAST. processing and the WHERE statement
In-Reply-To: <E1A1Wiu-0000aM-00@coumxnn01.netbenefit.co.uk>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 14:52 22/09/03 -0500, Greg Woolridge wrote (in part):
>...Based on this I think that the WHERE statement could affect which
>observation from an input data set is designated as FIRST. For instance,
>if a BY group has 5 observations in the input data set, but the first 2 do
>not meet the WHERE clause condition (i.e. they are not read into the PDV)
>then the third observation would be designated as FIRST. Am I correct in
>my assumptions, or am I missing something?
Greg, as Jack has illustrated, it's very easy to demonstrate that your
assumptions are correct - but I'm not really sure what other functionality
you might have reasonably expected.
A WHERE statement is essentially the same as a WHERE dataset option - and
effectively means that observations not meeting the WHERE clause criteria
'do not exist' as far as DATA step is concerned. That being the case, any
behaviour other than what you had assumed would be both illogical and
misleading. Functionally speaking, use of a WHERE statement is no
different from extracting a subset of a dataset prior to reading the
subsetted dataset into a DATA step.
Kind 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
----------------------------------------------------------------
|