LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Apr 1999 12:03:10 -0700
Reply-To:     "Berryhill, Timothy" <TWB2@PGE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Berryhill, Timothy" <TWB2@PGE.COM>
Subject:      Re: The WHERE statement does not work for rawdata
Content-Type: text/plain

Bob, I doubt most of us understand SAS and the C it is written in well enough to be precise in this discussion. I believe there is something called a program data vector (PDV) which contains each observation as the data step processes. I believe the WHERE statement (or dataset option) processes obs before they are moved to the PDV. On the other hand, the WHERE uses something from the PDV--if you drop a variable with a DROP= list in the SET statement, you cannot test that variable in a WHERE.

A tiny quibble, the efficiency of the WHERE is the avoided I/O and housekeeping. I do not think WHERE is more efficient than IF. If the data happened to be such that no obs were deleted, I would not expect a WHERE to select them all faster than an IF.

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0 > ---------- > From: Lambert, Bob[SMTP:Bob_Lambert@AFCC.COM] > Reply To: Lambert, Bob > Sent: Wednesday, April 21, 1999 11:01 AM > To: SAS-L@UGA.CC.UGA.EDU > Subject: Re: The WHERE statement does not work for rawdata > > I believe the WHERE statement processes conditions BEFORE the PDV is > loaded > and is therefore more efficient than the IF statement. I would appreciate > further clarification or debunkfication on this. > > Thanx, > > Bob Lambert > > -----Original Message----- > > From: Adolf Quast [SMTP:adolf-a.quast@DB.COM] > > Sent: Wednesday, April 21, 1999 7:25 AM > > Subject: Re: The WHERE statement does not work for rawdata > > > > Hi, > > > > the WHERE statement is very efficient because it uses the information > > stored in > > the PDV (program data vector) of a SAS-dataset. The PDV is created when > a > > SAS-Dataset is built. The PDV contains information about field length > and > > type. > > Your rawdata do not have a PDV, so they have to be read via INFILE and > > INPUT. > > > > Greetings > > Adolf Quast >


Back to: Top of message | Previous page | Main SAS-L page