Date: Fri, 6 Jul 2007 15:54:45 -0700
Reply-To: toby989@HOTPOP.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby989@HOTPOP.COM
Subject: Re: datastep drops your table
In-Reply-To: <331C5406E0EC64408B07D6B74516BE170200C7B8@BD01MSXMB018.US.Cingular.Net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I have version 9.1.3 SP3 on Win 2000.
Strange, I dont get the 2 WARNINGs that you get.
T
Duell, Bob wrote:
> Toby,
>
> Something's odd about this. I've been trying to reproduce your problem,
> but I can't do it. When I run a similar program, I get the same error
> message, but the original data set is *not* replaced, which meets my
> long-held expectations.
>
> What SAS version are you running and on what platform? Maybe you have
> some exotic SAS system option in effect that lets this happen.
>
> Bob
>
> (Below is the log from my test)
>
> 1 data a;
> 2 do x=1 to 10; output; end;
> 3 run;
>
> NOTE: The data set WORK.A has 10 observations and 1 variables.
> NOTE: DATA statement used (Total process time):
> real time 0.04 seconds
> cpu time 0.04 seconds
>
> 4 data a;
> 5 set a(rename(x=y));
> ------- -
> 12 12 22
> - -
> 22 200
> ERROR 12-63: Missing '=' for option RENAME.
> ERROR 22-322: Syntax error, expecting one of the following: a name, a
> quoted string, ;, END, KEY, KEYS, NOBS, OPEN, POINT,
> _DATA_, _LAST_, _NULL_.
> ERROR 22-7: Invalid option name X.
> ERROR 200-322: The symbol is not recognized and will be ignored.
> 6 run;
>
> NOTE: The SAS System stopped processing this step because of errors.
> WARNING: The data set WORK.A may be incomplete. When this step was
> stopped there were 0 observations and 0 variables.
> WARNING: Data set WORK.A was not replaced because this step was stopped.
> NOTE: DATA statement used (Total process time):
> real time 0.00 seconds
> cpu time 0.01 seconds
> 7 data a;
> 8 set a(rename=(x=y));
> 9 run;
> NOTE: There were 10 observations read from the data set WORK.A.
> NOTE: The data set WORK.A has 10 observations and 1 variables.
> NOTE: DATA statement used (Total process time):
> real time 0.09 seconds
> cpu time 0.01 seconds
>
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> toby989@HOTPOP.COM
> Sent: Friday, July 06, 2007 9:49 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: datastep drops your table
>
> Such a thing is unthinkable in a database environment. when there is an
> error in
> an sql statement, then the database makes sure that nothing is executed,
> to
> protect the data.
>
> typically SAS.
>
> Toby
>
>
> toby989@hotpop.com wrote:
>
>>
>>after I forgot the "=" SAS wiped out my entire table:
>>
>>
>>
>>
>>1911 data psdata.cwk;
>>1912 input y1 y2 school gender;
>>1913 cards;
>>
>>NOTE: The data set PSDATA.CWK has 1905 observations and 4 variables.
>>NOTE: DATA statement used (Total process time):
>> real time 0.01 seconds
>> cpu time 0.01 seconds
>>
>>
>>3819 ;
>>3820 run;
>>
>>
>>3821 data psdata.cwk;
>>3822 set psdata.cwk(rename(gender=sex));
>> ------- -
>> 12 12 22
>> ------ -
>> 22 200
>>ERROR 12-63: Missing '=' for option RENAME.
>>
>>ERROR 22-322: Syntax error, expecting one of the following: a name, a
>>quoted string, ;, END, KEY,
>> KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
>>
>>ERROR 22-7: Invalid option name GENDER.
>>
>>ERROR 200-322: The symbol is not recognized and will be ignored.
>>
>>3823 run;
>>
>>NOTE: The SAS System stopped processing this step because of errors.
>>NOTE: The data set PSDATA.CWK has 0 observations and 0 variables.
>>NOTE: DATA statement used (Total process time):
>> real time 0.06 seconds
>> cpu time 0.01 seconds
>>
>>
>>3824 data psdata.cwk;
>>3825 set psdata.cwk(rename=(gender=sex));
>>ERROR: Variable gender is not on file PSDATA.CWK.
>>ERROR: Invalid DROP, KEEP, or RENAME option on file PSDATA.CWK.
>>3826 run;
>>
>>NOTE: The SAS System stopped processing this step because of errors.
>>NOTE: The data set PSDATA.CWK has 0 observations and 0 variables.
>>NOTE: DATA statement used (Total process time):
>> real time 0.01 seconds
>> cpu time 0.01 seconds
>>
|