BookmarkSubscribeRSS Feed
rohitguptaecb
Calcite | Level 5

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

4 REPLIES 4
damanaulakh88
Obsidian | Level 7

Hi Rohit,

Go through this link and you are done Smiley Happy

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

/Daman

Michelle
Obsidian | Level 7

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

ping
Fluorite | Level 6

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.

Tom
Super User Tom
Super User

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 4 replies
  • 9046 views
  • 6 likes
  • 5 in conversation