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 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 11 Jul 2004 11:17:53 -0400
Reply-To:     Peter Hruby <hrubyp@sympatico.ca>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Hruby <hrubyp@SYMPATICO.CA>
Organization: Bell Sympatico
Subject:      Re: Eficient erasing of one record from dataset.

Jack my appologies, it is working exactly I need, thank you.

"Jack Hamilton" <JackHamilton@FIRSTHEALTH.COM> wrote in message news:s0ef0447.020@SLCM02.firsthealth.com... > The easiest way would be > > ===== (untested code) > data a; > modify a; > remove; > stop; > run; > ===== > > This makes some assumptions. Among them: > > - You won't later be using the NOBS= data set option to get the number > of observations in the data set. > - This is a "real" native-format data set. There are probably some > cases when non-real data sets can't using this technique. > > I suppose there's a reason you can't just use FIRSTOBS=2 when you read > the data set? > > > > > -- > JackHamilton@FirstHealth.com > Manager, Technical Development > Metrics Department, First Health > West Sacramento, California USA > > >>> "Peter Hruby" <hrubyp@SYMPATICO.CA> 07/09/2004 5:00 PM >>> > Hi all, > > I am looking for more efficient way to erase one record from dataset. I > have > 1 million records dataset. For very very complicated comparison of one > dataset with other which merge is not a solution at all, because > condition > are very complicated. I need to do loop macro and always erase 1 row > where > _n_ = 1; the problem is it reads all 1 million records which takes few > secs > to do it. I am looking for way to erase a record in no time. > > My version right now is: > > Data a; > set a; > if _n_ = 1 then delete; > run; > > Thank you for sugestions.


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