Date: Sun, 11 Jul 2004 11:17:53 -0400
Reply-To: Peter Hruby <firstname.lastname@example.org>
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
> The easiest way would be
> ===== (untested code)
> data a;
> modify a;
> 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?
> 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
> 1 million records dataset. For very very complicated comparison of one
> dataset with other which merge is not a solution at all, because
> are very complicated. I need to do loop macro and always erase 1 row
> _n_ = 1; the problem is it reads all 1 million records which takes few
> 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;
> Thank you for sugestions.