Missover vs Truncover

Reply
Contributor
Posts: 27

Missover vs Truncover

Its very confusing to understand the difference between these two. Can some one explain their difference and usage with a good example.

Frequent Contributor
Posts: 81

Re: Missover vs Truncover

Hi Rohit,

Go through this link and you are done Smiley Happy

http://www.nesug.org/proceedings/nesug01/at/at1sa1.pdf

/Daman

Contributor
Posts: 36

Re: Missover vs Truncover

Thanks for the link, I wish I had read that paper before the certification exam. I missed a question regarding truncover!

SAS also has brief description of difference here: http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a002645812.htm

Contributor
Posts: 22

Re: Missover vs Truncover

as the words indicate, MissOver will set missing if given data do not match SAS instruction (e.g. INPUT statement); TruncOver will truncate data according to SAS instruction. Missover is best used when you have missing at the END column of data.

Super User
Super User
Posts: 6,498

Re: Missover vs Truncover

Consider the case when you try to read 10 characters (for example when using $10. informat) into variable NAME and there are only 5 left on the line. With MISSOVER the NAME will be missing, but with TRUNCOVER the five characters will be used as the value of NAME.

MISSOVER should normally never be used. Exception might be when you know that if the value is short it will be invalid (say a phone number or zip code).

You will frequently see programs coded to use MISSOVER and PAD.   This is result of old programs (or old habits) from before the TRUNCOVER option was added.  When you combine MISSOVER and PAD then you will get the same results as TRUNCOVER.

Ask a Question
Discussion stats
  • 4 replies
  • 3028 views
  • 4 likes
  • 5 in conversation