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 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Apr 2006 22:41:39 -0700
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: SAS-L Digest - 27 Apr 2006 - Special issue (#2006-778)
In-Reply-To:  <>
Content-Type: text/plain; format=flowed

BoraYavuz@HSBC.COM.TR wrote back: >Hello, > >Once again, not only has my problem been diagnosed sagely by the venerable >members of SAS-L, but also I have learned something new about the internal >mechanism of index creation (which I, to my regret, had skipped delving >into until now!). Thank you soooo much really (in order of appearance: >Sigmund, Arun, Ian and Michael). :-) > >As it appears, my datasets's "sortedby= ..." value is "YES" and SAS doesn't >seem to like it. I didn't know I "asserted" anything let alone "lied" to >SAS -- at the hindsight, even if I did lie, I must have done it >unintentionally. Therefore I repent and plan to ask for forgiveness and >salvation as follows: > >proc datasets library= analiz nolist; > modify crm_jul05(sortedby= _null_); > index create rimno; >quit; > >This solution has worked on the data set Ian provided, so I assume it will >do so on my table too (if my table is not damaged or something) -- well, >we'll see the outcome in about an hour or so anyway. > >One final point makes me wonder though: Why did SAS *allow* me to lie in >the first place? My presumption was that I would have obtained a SAS error >telling me more or less that <although I "assert" that my data set is >sorted, it is not; therefore I am not allowed to designate my data set as >sorted>. I vaguely remember having received such an error on another >occasion for another table, but for this case I don't remember having seen >such an error in the log. Could that be? Or am I just wandering near the >borders of dementia? :-) > >Cheers, > >Bora Y. > >PS: In addition, it seems it is high time that I checked the local SAS >office to see if they have already have Michael's book on indices and / or >placed an order ;-)

All computer languages trust what you tell them. It's how they work. Languages which resist letting you think for yourself tend to be hard to work with, and difficult to do anything but what the designers had in mind.

I *like* the fact that we can load in a data set from anywhere and tell SAS that the data are already sorted on key variables. The alternative is having to sort what might be a hideously large data set when we don't need to!

Yes, the downside is that when we accidentally lie to SAS, it can get cranky about it. But it is really easy to have a sorted data set which doesn't sort right later on. What if the data are sorted on a mainframe running EBCDIC and we import the file to a PC running ASCII? The sort order is different between the two! What if we take a sorted file, append or insert some records, and insist that the file is still sorted? It might be. It might not be sorted any longer. What if we sort based on one NLS and switch to another? Is the file still 'sorted'? There are plenty of ways to mess this up.

Fortunately, we have people like Mikeeee to keep everything straight for us.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ Security.

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