BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
aplaisted
Calcite | Level 5

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
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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

3 REPLIES 3
kannand
Lapis Lazuli | Level 10

Would you be able to attach the log file?

Kannan Deivasigamani
Tom
Super User Tom
Super User

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.

aplaisted
Calcite | Level 5

This fixed the issue!  Thank you!

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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