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 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 20 Jul 2009 13:42:22 -0400
Reply-To:   Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject:   Re: zero observation dataset
Content-Type:   text/plain; charset=ISO-8859-1

another question (for me): what's the use of a dataset with no variables? The stop-trick I use very often to get a empty dataset with a certain variable structure. Imagine you want to continuous APPEND data, perhaps in a macro loop and need a initial dataset to append to.

So I normally use:

data empty; set sashelp.class; stop; run;

But maybe there is any use of a empty dataset without any variables (I agree, that is kind of "more empty" than mine...)

Gerhard

On Mon, 20 Jul 2009 09:31:14 -0700, -bwg <barry.grau@GMAIL.COM> wrote:

>This can be further simplified: > >data one; > stop; > run; > >Only then > >proc sql; > create table two like one; > >doesn't work. proc sql won't operate on tables without columns. > > >On Jul 19, 2:54 pm, j...@STANFORDALUMNI.ORG (Jack Hamilton) wrote: >> You left out the STOP statement: >> >> ===== >> data one; >> a = 1; >> stop; >> run; >> ===== >> >> creates a zero obs data set. Without the STOP, you get one obs. >> >> -- >> Jack Hamilton >> j...@alumni.stanford.org >> Tots units fem for�a! >> >> On Jul 19, 2009, at 9:42 am, Wensui Liu wrote: >> >> >> >> > see if it is what you need. >> >> > data one; >> > a = 1; >> > run; >> >> > proc sql; >> > create table yours like one; >> > quit; >> >> > On Sun, Jul 19, 2009 at 2:01 AM, msiddu2000<msiddu2...@gmail.com> >> > wrote: >> >> How to create a zero observation dataset using datastep and proc sql? >> >> > -- >> > ============================== >> > WenSui Liu >> > Blog : statcompute.spaces.live.com >> > Tough Times Never Last. But Tough People Do. - Robert Schuller >> > ==============================


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