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 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 29 Apr 2009 07:58:34 -0700
Reply-To:   Daniel Nordlund <djnordlund@VERIZON.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Daniel Nordlund <djnordlund@VERIZON.NET>
Subject:   Re: How to create a dataset by appending a single (i.e same) dataset multiple times.??
In-Reply-To:   <200904290901.n3SLgWVf009480@malibu.cc.uga.edu>
Content-type:   text/plain; charset=iso-8859-1

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of S øren Lassen > Sent: Wednesday, April 29, 2009 2:01 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: How to create a dataset by appending a single > (i.e same) dataset multiple times.?? > > Gerhard, > I do not suggest using "set statement with 100 input > datasets". I suggest > iterating over the same set statement a number of times. > > Why so complicated? Because the original poster wanted that order > of the obs. > > I think that Dan is right - as the size of the input data set grows, > the advantage of using a single data step decreases, and may > eventually disappear. On the other hand, I still prefer this log > entry (the times were for the original 3 obs. sample data set): > > NOTE: The data set WORK.WANT has 300 observations and 2 variables. > NOTE: DATA statement used: > real time 0.00 seconds > cpu time 0.00 seconds > > to parsing a log with 100 notes about PROC APPEND. > > But of course, if the order of the observations is not > important, your suggestion is probably to be preferred. > > Regards, > Søren > > On Wed, 29 Apr 2009 04:44:37 -0400, Gerhard Hellriegel > <gerhard.hellriegel@T-ONLINE.DE> wrote: > > >I'd not use a set statement with 100 input datasets! Note > that SAS creates > >a buffer for each dataset which costs a lot of memory and a > lot of CPU > >time. > >If you want to do that, use at least open=defer as option for each > dataset. > > > >One question: why so complicated? The following does the > same, only with > >another order for the obs: > > > >data a; > > set sashelp.class; > > do i= 1 to 100; > > output; > > end; > > drop i; > >run; > > > >Gerhard > > > > > >

Well, as usual, then L has given the OP several options to choose from. I also appreciate the various posts because I always learn something, or at least am reminded of things to think about that I sometimes fail to do. I hadn't thought about the implications of having a very wide dataset on overhead for proc append. Thanks Gerhard. And I agree with Søren that a single data step produces a much cleaner log. And data _null_ presented a novel use of Proc surveyselect. Always interesting on the L.

Dan

Daniel Nordlund Bothell, WA USA


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