I'm trying create a large sas log into a sas dataset via infile statement. When I read in the file, it ends at 826 records, when the log contains many more records. The code I am using is as follows:
data file;
infile "[program location].log" dsd dlm='09'x truncover ;
input line $200.;
run;
Why would this get cut off? Is there anything I can change to the code to make it read in all records from the log? My only thought is that there seems to be an arrow in the log where there was a " > " in the program. Could this make the infile end prematurely? And is there a way to ignore strange characters like this, that were printed to the log?
Thanks,
Amanda
What do the notes from the data step you ran say? Does it indicate that some lines were truncated?
What operating system are you running SAS on? Windows used to interpret a specific character as an end of file marker. You could try adding the IGNOREDOSEOF option to the INFILE statement.
is used in the context of I/O operations on variable record format files. When this option is specified, any occurrence of ^Z is interpreted as character data and not as an end-of-file marker.
Would you be able to attach the log file?
What do the notes from the data step you ran say? Does it indicate that some lines were truncated?
What operating system are you running SAS on? Windows used to interpret a specific character as an end of file marker. You could try adding the IGNOREDOSEOF option to the INFILE statement.
is used in the context of I/O operations on variable record format files. When this option is specified, any occurrence of ^Z is interpreted as character data and not as an end-of-file marker.
This fixed the issue! Thank you!
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.