Date: Mon, 12 Aug 2002 09:36:11 -0400
Reply-To: Quentin McMullen <QuentinMcMullen@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Quentin McMullen <QuentinMcMullen@WESTAT.COM>
Subject: Re: How smart is the Word Scanner?
Content-Type: text/plain; charset="iso-8859-1"
Jack Hamilton [mailto:JackHamilton@FIRSTHEALTH.COM] wrote (in part):
> I think it's the compiler doing syntax checking which puts out the
> notes. Don't we know that the data step has a one-pass compiler? It
> might as well do part of the compilation while it's reading each line.
> I think it compiles as it goes, rather than doing it all at the end.
>
> Consider:
>
> -----
> 93 data j k df ks kljk kdjs fl kf;
> 94 retain a1-a100000 0.;
> 95 run cancel;
>
> NOTE: Data step not executed at user's request.
> NOTE: DATA statement used the following computer resources:
> Buffered IO: 26 Elapsed time: 0 00:00:05.36
> Direct IO: 26 CPU time: 0 00:00:04.66
> Page Faults: 759
> -----
>
> That's taking a long time to do nothing. The alternative, which is
> what I think happens, is that the compiler compiles each line
> as it goes
> and then throws the results away when it hits the RUN CANCEL.
Thanks Jack. That's a good example. In fact on Windows 98 SAS 8.2, if I
just highlight the first two lines of your test and submit them, I get an
hour glass (SAS is thinking) for quite a few seconds. Even without the end
of the step. This is certainly contrary to what I had imagined (that
compiler waited until it had a full step, then started compiling).
<snip>
> By the way, here's your data b example run under OpenVMS v6:
>
> -----
> 1? data
> 2? b
> 3? ;
> 4? x
> 5? =
> 6? 1
> 7? ;
> 8? run;
> NOTE: The data set WORK.B has 1 observations and 1 variables.
> -----
>
> I don't get an error message.
Interesting. Indeed, I had expected this code to work when submitted
line-by-line, and even vaguely remembered having been taught it by SI in
v6.12 training. But I get an error on 8.2 on Win 98. A *birdie* told me he
considers this to be a bug. He pointed out that while this will give an
error using the Enhanced Editor, it runs fine if you submit it line-by-line
from the old program editor. Yikes.
Kind Regards,
--Quentin
|