Date: Wed, 1 Feb 2006 11:26:10 -0500
Reply-To: "Dorfman, Paul" <paul.dorfman@FCSO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dorfman, Paul" <paul.dorfman@FCSO.COM>
Subject: Re: A question about data step
Mikhail,
Why, you have shown a SAS data set equivalent of FILE MOD earlier in this
very thread yourself!
data base ;
if 0 then modify base ;
set add ;
output ;
run ;
And it takes hardly longer than APPEND if the ADD file is small relative
to BASE. For instance, appending 1e5 rows to 1e7 rows with 11 ballast 8-
byte variables each takes about .5 sec for MODIFY and .45 sec for APPEND
(on my client's current AIX box).
Sure the difference gets wider as ADD grows in size - for APPEND reads
neither BASE or ADD conventionally, instead using "block-read"/"block-
write" methods to splice the two, while MODIFY reads the entire ADD in
earnest. On the other hand, the latter makes the MODIFY trick all the more
similar to FILE MOD, does it not? to say nothing of semantics...
Kind regards
------------
Paul Dorfman
Jax, FL
------------
On Wed, 1 Feb 2006 08:08:16 +0300, Mikhail Konovalov <ipmikon@MAIL.RU>
wrote:
>Hello bruce.
>
>I was wrong, it is not about efficiency. I can create a view instead
>of dataset and append that view.
>I just dont like the fact that i need intermediate file to do
>appending (dataset or view). SAS allows to open files for appending
>(FILE MOD). Why there is no such option for datasets?
>
>Regards, Mikhail
>
>---------------------------------------------------
>On Wednesday, February 1, 2006 12:05:29 AM, bruce johnson
<chimanbj@GMAIL.COM> wrote:
>
>> I'm curious as to why you happen to think that PROC APPEND is
>> inefficient? I find it quite efficient, and easy code-wise as well.
|