|
Richard,
Sure: OPTION NONOTES. However, I know nothing you can do in the Data step to
avoid the note while reading using @@, because such us the nature of the
process - you are asking SAS yourself to go to a new line to grab next X
when the current record has nothing else left to read. Of course you can
eschew the whole @@ in favor of, say,
data foo ( drop = _: ) ;
infile cards missover ;
array _x [99] ;
input _x [*] ;
do _n_ = 1 by 1 while ( _x [_n_] ne . ) ;
x = _x [_n_] ;
output ;
end ;
cards ;
1 2 3 4
5 6
7
8 9 10
;
run ;
But I am not sure that avoiding the little NOTE is worth the labor. By the
way, SAS warns in the documentation that if you are going to use @@ in this
manner, the note is imminent:
"Note: Although this program successfully reads all of the data in the input
records, SAS writes a message to the log noting that the program had to go
to a new line."
Kind regards,
----------------
Paul M. Dorfman
Jacksonville, FL
----------------
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On
> Behalf Of Richard A. DeVenezia
> Sent: Monday, August 16, 2004 11:13 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: NOTE: SAS went to a new line
>
> I get the number of obs I want (10), but is there a way to
> prevent the NOTE:
> about a new line ?
>
> -----
> data foo;
> input x @@;
> cards;
> 1 2 3 4
> 5 6
> 7
> 8 9 10
> ;
> run;
> -----
> NOTE: SAS went to a new line when INPUT statement reached
> past the end of a line.
> NOTE: The data set WORK.FOO has 10 observations and 1 variables.
>
> infile cards missover; caused this message
> ERROR: The INFILE statement MISSOVER option and the INPUT
> statement double trailing @ option,
> are being used in an inconsistent manner. The
> execution of the DATA STEP is being
> terminated to prevent an infinite loop condition.
>
> --
> Richard A. DeVenezia
>
|