Date: Tue, 25 Oct 2005 14:01:35 -0700
Reply-To: Peter <crawfordsoftware@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter <crawfordsoftware@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: Saving 3 lines of array declaration/So Concise that it
becomes Scary/proc compare valid?
Content-Type: text/plain; charset="iso-8859-1"
doesn't work in my sas9.1.3
192 data ps2004dic;
193 set ps2004 ;
194 if q: ~=. then q: = 0< q: <3;
-
388
76
--
200
ERROR 388-185: Expecting an arithmetic operator.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 200-322: The symbol is not recognized and will be ignored.
195 run;
NOTE: The SAS System stopped processing this step because of errors
WARNING: The data set WORK.PS2004DIC may be incomplete. When this step
was stopped there were
0 observations and 79 variables.
WARNING: Data set WORK.PS2004DIC was not replaced because this step was
stopped.
NOTE: DATA statement used (Total process tim
Interesting that it got as far as thinking it had started running
toby989@hotpop.com wrote:
> Hi All
>
> Refering to my post on Oct 20, I was looking for a more simple way for
> my code, got a suggestion (relating to the if statement) and implemented
> it the following way.
>
> data ps2004dic;
> set psdata.ps2004;
> array q q:;
> do over q;
> if q~=. then q=0<q<3;
> end;
> run;
>
> Now I experimented some more and found an very concise code that seems
> almost scary to me. Is following code a valid substitution for the above
> one - omitting an explicit array declaration?
>
> data ps2004dic;
> set psdata.ps2004;
> if q: ~=. then q: = 0< q: <3;
> run;
>
> I run a proc compare on both of the resulting datasets and it shows they
> are exactly the same, however, are there loopholes that proc compare
> cannot detect?
>
> I appreciate comment.
>
> Thanks Toby
>
>
>
>
>
>
>
>
>
............
no dice in sas9.1.3
192 data ps2004dic;
193 set ps2004 ;
194 if q: ~=. then q: = 0< q: <3;
-
388
76
--
200
ERROR 388-185: Expecting an arithmetic operator.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 200-322: The symbol is not recognized and will be ignored.
195 run;
NOTE: The SAS System stopped processing this step because of errors
WARNING: The data set WORK.PS2004DIC may be incomplete. When this step
was stopped there were
0 observations and 79 variables.
WARNING: Data set WORK.PS2004DIC was not replaced because this step was
stopped.
NOTE: DATA statement used (Total process tim
Interesting that it got as far as thinking it had started running