DATA Step, Macro, Functions and more

Infile cut off records

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Infile cut off records

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


Capture.PNG

Accepted Solutions
Solution
‎11-02-2015 12:45 PM
Super User
Super User
Posts: 6,499

Re: Infile cut off records

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.

 

IGNOREDOSEOF

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.

View solution in original post


All Replies
Regular Contributor
Posts: 161

Re: Infile cut off records

Would you be able to attach the log file?

Kannan Deivasigamani
Solution
‎11-02-2015 12:45 PM
Super User
Super User
Posts: 6,499

Re: Infile cut off records

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.

 

IGNOREDOSEOF

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.

New Contributor
Posts: 4

Re: Infile cut off records

This fixed the issue!  Thank you!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 246 views
  • 2 likes
  • 3 in conversation