01-17-2013 10:34 AM
I'm trying to read a file with 6.7M records, but my data step quits after only 105k with no errors. There are control codes in the file that convinces SAS that the file has ended. The file is an exported .csv file from the RapidSQL query tool on the same platform (WinXP, SAS 9.2). (FYI, when I tried to read the data directly from the server via ODBC, it got stuck. It ran overnight; I killed it and got no results.) I can import the first million rows into excel, and, indeed it contains a funny character in the line that SAS stopped on. It's character hex 1A, which is ctrl-z, the EOF character.
Q: Can control characters be cleaned out using SAS?
The (vastly simplified) code:
data blah ;
infile "textfile.csv" lrecl=32767 ;
An excerpt from the log:
NOTE: The infile "textfile.csv" is:
File Size (bytes)=962846799,
NOTE: 105454 records were read from the infile "textfile.csv".
The minimum record length was 128.
The maximum record length was 146.
Need further help from the community? Please ask a new question.