Hi there!
I'm trying to read in text file with "End of Media" special character in the middle of the file and SAS read all the data before that character only - is there any possibility to read in the whole file?
data TEST; infile "test.txt" truncover; length REC $400; input REC 1-400; LINE=_N_; run;
File contain more than 40k records and in dataset I get only first 3000 records, the last one is the string with EM character in the middle of the string, so I see this first part of the string in the last record...
Are the any options to read text file line by line including special characters like "End of Media" or maybe to tell SAS to not use EM as EoF marker?
Here is what Notepad++ shows when I'm looking into the file - please see 3rd line - there are some special characters in the line and one of them is EM which makes SAS to stop reading the data:
And what I get in dataset:
Thanks,
Anton.
Use the IGNOREDOSEOF option on the INFILE statement. Or when defining the fileref using a FILENAME statement.
Use the IGNOREDOSEOF option on the INFILE statement. Or when defining the fileref using a FILENAME statement.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.