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.
There are papers on this:
https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p009-26.pdf
Other people have asked the same question:
Plus plenty of other material on a quick Google search which should answer this question.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.