BookmarkSubscribeRSS Feed
2 REPLIES 2
Kurt_Bremser
Super User

missover sets a variable where not enough data is present to missing, while truncover reads what's available:

data _null_;
file '$HOME/test.txt';
input testvar $10.;
put testvar;
cards;
1234567890
1234
;
run;

data test1;
infile '$HOME/test.txt' missover;
input testvar $10.;
run;

data test2;
infile '$HOME/test.txt' truncover;
input testvar $10.;
run;

In test1, testvar will be empty for the second observation, while in test2, it gets the "1234".

 

truncover is newer and preferred.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

There are papers on this:

https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p009-26.pdf

 

Other people have asked the same question:

https://communities.sas.com/t5/SAS-Programming/What-is-the-difference-between-Missover-and-Truncover...

 

Plus plenty of other material on a quick Google search which should answer this question.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 1066 views
  • 0 likes
  • 3 in conversation