Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

infile limitation?

Status
Not open for further replies.

patriarc

Programmer
Feb 7, 2006
3
SE
I am trying to read a tab separated text file using the infile statement. The problem is that one of the text strings is about 2500 characters long. My SAS 8.2 only seems to allow you to read in max 1000 characters. Is there a way around this limitation?
 
Have you set the lrecl= option on your infile statement? Set that to be as long, or longer, than the maximum possible record length. I think it defaults to about 1024, so if you have a really long record, you need to set the record length to something longer to accomodate.
The same applies if you write the data out to a flat file too.
 
yes, I have set it to lrecl=32767. It still won´t accept more than 1000 characters.
 
patriarc,
I just tried using the infile statement in my SAS 8.2 and I was successful in inputing a value field of 15500 chars. I believe that the problem lies in your data. There may be a tab embedded in your data. I would try to clean the data first, by going through the data and removing (converting) offending characters to something that SAS can use.
Hope you find a solution.
Klaz
 
Hi Patriarc, please post your code and log, there might be a clue in there.
Cheers
 
It worked! Thanks for the help. It´s seems there was a few extra tabs in my text file. I corrected that and now it works fine! :)

Thanks!
Patriarc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top