09-06-2012 02:52 PM
We have a problem reading a huge file. The sas code only read part of the input records and stop without any error. Further examine the file where the input was stop, we find a symbol 'E S' that halted any further processing. The HEX value is '1A'. We have tried:
infile fin lrecl=314 truncover;
But it does not work. Does anyone has this problem and how to resolve this issue ?
Thanks for all your help
09-06-2012 03:07 PM
if you want to only keep numbers then try:
if you want to keep both numbers and characters then try:
09-07-2012 09:50 AM
Your code elminated to many other symbol such as - , which we might need to retain. Besides, if the file come in as a fixed column, then the compress will shift that record left which can be a headache for the input statement.
Anyway, thanks for your input.
09-07-2012 05:02 AM
From the LRECL option you've specified I'm guessing that maybe this is a fixed rec size file, am I right?
If so, there's no CR/LF in the file and you have to specify the option recfm=F, then SAS will import everything to the end of each record (314 in length).
Then compress with modifier kpw (keep punction + printable chars) will remove the SUB code (1Ax).
infile fin lrecl=314 truncover recfm=F;
Cheers from Portugal.
Daniel Santos @ www.cgd.pt
09-07-2012 09:27 AM
I still vote for trying the ignoredoseof option. It was incorporated, specifically, to deal with the presence of 1A characters. Take a look at: http://www.sascommunity.org/wiki/IGNOREDOSEOF_Option