BookmarkSubscribeRSS Feed
deleted_user
Not applicable
can anyone explain the difference between MISSOVER and TRUNCOVER options with example.Both produce same results i guess.In what way they both differ?
5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
In the documentation, there is a topic:
"Starting with Raw Data: Beyond the Basics"
and in that topic is a sub-topic:
"Problem Solving: When an Input Record Unexpectedly Does Not Have Enough Values"

That section of the doc has very thorough examples of MISSOVER, TRUNCOVER, FLOWOVER and STOPOVER. With data and code....

I recommend this section. If you search for the string "TRUNCOVER" in the on-line doc, you should find the "Starting with Raw Data" topic and can follow links from there.

cynthia
deleted_user
Not applicable
hi cynthia,
thanks for the help..can you give me the link of the mentioned online doc.
deleted_user
Not applicable
hey..thanks a lot..for giving the website...
WarrenR_SAS
SAS Employee
The main difference between MISSOVER and TRUNCOVER occurs when you have variable length records and are using formatted or column input. TRUNCOVER reads "partial" data that falls at the end of the record, whereas MISSOVER sets the value to missing.

An example to further clarify: An INPUT statement requests to read exactly 5 bytes starting at position 18, but a data record is only 20 bytes long. TRUNCOVER will treat bytes 18-20 as valid data. MISSOVER sees that bytes 21 and 22 are not present and considers the field to be invalid. If the record had been 17 bytes long, both TRUNCOVER and MISSOVER would produce a missing value.

Variable length records were pretty rare in the early mainframe days of SAS, but they are nearly universal in Windows and Unix-family systems. As a general rule, TRUNCOVER should be used in most modern SAS applications.

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