- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-15-2008 11:36 AM
(13229 views)
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
hi cynthia,
thanks for the help..can you give me the link of the mentioned online doc.
thanks for the help..can you give me the link of the mentioned online doc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The online documentation can be found at: http://support.sas.com/documentation/onlinedoc/base/index3.html.
Direct link to the language reference: http://support.sas.com/onlinedoc/913/docMainpage.jsp?_topic=lrdict.hlp/a002295669.htm
Direct link to the language reference: http://support.sas.com/onlinedoc/913/docMainpage.jsp?_topic=lrdict.hlp/a002295669.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
hey..thanks a lot..for giving the website...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.