Date: Mon, 9 Oct 2006 12:47:37 -0400
Reply-To: "data _null_;" <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_;" <datanull@GMAIL.COM>
Subject: Re: the "n=" option in the infile statement
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 10/9/06, Arthur Westover <firstname.lastname@example.org> wrote:
> I am converting a .asc database into a SAS database.
> I was using the boilerplate code from the government
> agency, and I was getting errors saying that I had
> invalid data and SAS suggested that I change the
> "infile n=" option.
> So I tried looking up what that meant, and I found
> "specifies the number of lines that are available to
> the input pointer at one time."
> I didn't really understand what this meant. But I
> arbitrarily added 'n=10' to my infile statement, and
> suddenly no errors.
> However, I really don't understand what I did. Did I
> increase some sort of buffer for SAS in the import
> process? Is it possible I have corrupted the data in
> the import process?
I would guess perhaps yes. But then you don't show enough of the
input statement to help answer that question.
In your original attempt to read the file did you get the flowover
message. SAS when to a new line the the input statement reached the
end of the line.
That might indicate the the PAD or TRUNCOVER options should be used.
I would guess the .ASC file has variable length records but your
government boiler plate was written for fixed length records.
Please supply more information, and specific detail.
> As an example of what the input statement looks like:
> INPUT @1 ADAYWK 2.
> @3 AGE 3. etc.
> Thanks as always,