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 (July 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 7 Jul 2009 19:59:53 -0400
Reply-To:     Mark Miller <mdhmiller@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mark Miller <mdhmiller@GMAIL.COM>
Subject:      Re: "BY variables are not properly sorted" error message on sorted
Comments: To: "Kirby, Ted" <ted.kirby@lewin.com>
In-Reply-To:  <100FCDB28E638D4B903CB7D2056E43C7028356DC@USFCH-MAIL1.lewin.com>
Content-Type: text/plain; charset=ISO-8859-1

Ted, et al

How about running a RAM diagnostic like Windows Memory Test?

No one has suggested this, so I'll note that I had a suite of SAS programs which I had run weekly for years when all of sudden I seemed to have a whole raft of inexplicable SAS problems including sort issues like "BY Variables are not properly sorted". The failures seemed to be almost random --sometimes the programs ran fine, other times I couldn't get beyond the sort step as the next Proc or Data step in sequence would fail because of not sorted -- even though Proc Sort had run just fine. On inspection, the data file really was not sorted properly, but the out of sequence position varied from failure to failure. In order to meet a particular deadline, I switched the SAS runs to a different host and had no problems whatsoever. This suggested to me that something was amiss with my primary workstation. As I was using 6 drives on that system, I swapped out working drives, one by one, but the errors still occurred (at random). Finally I got one spare new memory module and started swapping out RAM modules one by one -- BINGO -- problem solved. To verify this, I restored all the original memory modules, and then ran a memory tester I got from MS web site -- the test showed that ONE module was failing intermittently. I replaced that memory module and no similar errors have occurred in the past year.

... Mark Miller

On Tue, Jul 7, 2009 at 4:04 PM, Kirby, Ted <ted.kirby@lewin.com> wrote:

> Unfortunately, I no longer have the log, but as I mentioned before, > there was nothing non-standard in the log, just the usual stuff about > how long the sort took. There was no indication in the log that the > sort failed. Had the log indicated that the sort failed, then my > question to the group would have been: Why did the sort fail? > > I created the file just before sorting it, so access is not the problem. > No one else was attempting to use the file. I had just created it, so no > one else even knew it existed. > > --Ted > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Arthur Tabachneck > Sent: Tuesday, July 07, 2009 2:24 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: "BY variables are not properly sorted" error message on > sorted > > Ted, > > You didn't show the part of the log describing the results of the sort. > One possibility is that the sort itself failed, possibly because you > didn't have access rights, someone else tried to access the file at the > same time, or some other reason). > > Art > ------- > On Tue, 7 Jul 2009 14:08:06 -0400, Kirby, Ted <ted.kirby@LEWIN.COM> > wrote: > > >I do not know where you got the quote of what I supposedly submitted > >because it is incorrect. I just checked my original post and the "3D" > >did not appear in the "data=" section of the PROC SORT statement. > > > >--Ted > > > >-----Original Message----- > >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > >such > >Sent: Monday, July 06, 2009 1:12 AM > >To: SAS-L@LISTSERV.UGA.EDU > >Subject: Re: "BY variables are not properly sorted" error message on > >sorted > > > >Dear Ted, > > > >What is evident from your code is that you are sorting different > >dataset(3Dcr.num06) and using different dataset (cr.num06). > > > >If you will sort the dataset cr.num06 then this problem will be solved. > > > >Such > > > >On Jul 2, 2:39 am, ted.ki...@LEWIN.COM ("Kirby, Ted") wrote: > >> I have created a dataset, called "num06" and submitted the following > >> code: > >> > >> proc sort data=3Dcr.num06; by rpt_rec_num; run; > >> data num ; > >> set cr.num06; > >> by rpt_rec_num ; > >> DummyRecNum+1; > >> run; > >> > >> and I get the following error: > >> > >> ERROR: BY variables are not properly sorted on data set > >> CR.NUM06. > >> rpt_rec_num=3D225759 ws=3DH010000 line=3D01100 col=3D0700 > >> item=3D-43668 FIRST.rpt_rec_num=3D0 > >> LAST.rpt_rec_num=3D1 DummyRecNum=3D7005469 _ERROR_=3D1 > >_N_=3D7005470 > >> NOTE: The SAS System stopped processing this step because of > >> errors. > >> NOTE: There were 7005471 observations read from the data set > >> CR.NUM06. > >> WARNING: The data set WORK.NUM may be incomplete. When this > >> step was stopped there were > >> 7005469 observations and 6 variables. > >> WARNING: Data set WORK.NUM was not replaced because this step > > >> was stopped. > >> NOTE: DATA statement used (Total process time): > >> real time 20.75 seconds > >> cpu time 3.76 seconds > >> > >> When I try to recreate the dataset and rerun the code, I still get > >> the > > > >> same error, but not necessarily on the same observation (_n_). I > >> have > > > >> examined the "offending" observation(s) and those around it, but can > >> find nothing that I could determine would cause this problem. (My > >> real program was much more complicated, but the error happened even > >> on > > > >> this little program.) > >> > >> Any ideas? > >> > >> Thanks, > >> > >> --Ted Kirby, > >> Consultant, > >> The Lewin Group, Inc. > >> 3130 Faivew Park Drive, Suite 800 > >> Falls Church, VA 22042 > >> e-mail: ted.ki...@lewin.com <mailto:ted.ki...@lewin.com>=20 > >> P: (703)269-5507 > >> F: (703)269-5501 > >> > >> ************* IMPORTANT - PLEASE READ ******************** > >> > >> This e-mail, including attachments, may include confidential and/or > >> propr= ietary information, and may be used only by the person or > >> entity to which= it is addressed. If the reader of this e-mail is > >> not > > > >> the intended recipi= ent or his or her authorized agent, the reader > >> is > > > >> hereby notified that an= y dissemination, distribution or copying of > >> this e-mail is prohibited. If= you have received this e-mail in > >> error, please notify the sender by repl= ying to this message and > >delete this e-mail immediately. > >> =0D > >************* IMPORTANT - PLEASE READ ******************** > > > >This e-mail, including attachments, may include confidential and/or > proprietary information, and may be used only by the person or entity to > which it is addressed. If the reader of this e-mail is not the intended > recipient or his or her authorized agent, the reader is hereby notified > that any dissemination, distribution or copying of this e-mail is > prohibited. If you have received this e-mail in error, please notify the > sender by replying to this message and delete this e-mail immediately. > > > ************* IMPORTANT - PLEASE READ ******************** > > This e-mail, including attachments, may include confidential and/or > proprietary information, and may be used only by the person or entity to > which it is addressed. If the reader of this e-mail is not the intended > recipient or his or her authorized agent, the reader is hereby notified that > any dissemination, distribution or copying of this e-mail is prohibited. If > you have received this e-mail in error, please notify the sender by replying > to this message and delete this e-mail immediately. > >


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