Date: Mon, 26 May 2003 15:33:36 -0500
Reply-To: Aldi Kraja <aldi@WUBIOS.WUSTL.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Aldi Kraja <aldi@WUBIOS.WUSTL.EDU>
Organization: Posted via Supernews, http://www.supernews.com
Subject: Re: sequential reading: input
Content-Type: text/plain; charset=us-ascii; format=flowed
Hi Karl,
Thank you for your input:
The result is as expected:
1-04 2 1 1 0.5967742
1-04 2 1 2 0.4032258
Aldi
Karl K. wrote:
> Your statement:
>
> input #(counter*912+20) percent E12.5 +1 @@;
>
> moves the pointer to the start of the input line each time through the
> inner loop. Move the "input #(counter*912+20)" outside the loop, and add
> a trailing "@". I also believe that a single trailing "@" is all you need
> in every instance. Finally, if you're always advancing the pointer to the
> 6th line, I find 5 slashes easier to read than the calc. So I'd recommend
> the following (slightly simplified by removing macro code and outer do
> while loop):
>
> input #(counter*912+1) mkname $12. ///// nr
> #(counter*912+20) @;
> do j=1 to nr;
> input percent E12.5 +1 @;
> al=j;
> output;
> end;
>
> HTH
> Karl
>
|