|
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
>> > ==============================
|