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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.