BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ManitobaMoose
Quartz | Level 8

Missover is used for List Inputs. Pad is used for Column and Formatted Inputs. Truncover replaces Pad for Column and Formatted inputs, Does it also replace Missover for List inputs? Is there ever a time when truncover is not a viable substitute for Pad or Missover? Are there ever times when Pad or Missover are more efficient/preferred vs truncover? Can I just use truncover from now on and pretty much forget about pad and missover, unless I come across it in code someone else has written?

 

Tx!

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Not sure where you are getting your statements of what the options are used for.

 

MISSOVER means the opposite of FLOWOVER which is the default.  So instead of hunting to the next line when it runs out of data it reads nothing.

 

PAD is what it sounds like.  Short lines are padded with spaces to the logical record length (LRECL).

 

TRUNCOVER is "new" (less than 30? years old) and eliminates one of quirkier "features" of MISSOVER that can happen when reading a fixed number of characters.   If you use MISSOVER and try to read past the end of the line then instead of using the characters that are there it reads nothing.  So if you are trying to read 10 characters into NAME and the only thing left at that position is 'FRED' then NAME will be missing instead of being set to 'FRED'.

 

Basically using TRUNCOVER eliminates the need for MISSOVER (with or without PAD).  Unless you really really really want SAS to throw away those short values you should always use TRUNCOVER and just forget that MISSOVER option even still exists.

 

If you do see MISSOVER in someone's code then triple check their INPUT statement and make sure it uses list mode only and not formatted/positional input.  That is if they have informat specifications in the INPUT statement then the informats MUST have the : (colon) modifier in front of them.  If they are reading from positions (input name $ 1-40; ) then make sure that it is ok that short values will become missing.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Not sure where you are getting your statements of what the options are used for.

 

MISSOVER means the opposite of FLOWOVER which is the default.  So instead of hunting to the next line when it runs out of data it reads nothing.

 

PAD is what it sounds like.  Short lines are padded with spaces to the logical record length (LRECL).

 

TRUNCOVER is "new" (less than 30? years old) and eliminates one of quirkier "features" of MISSOVER that can happen when reading a fixed number of characters.   If you use MISSOVER and try to read past the end of the line then instead of using the characters that are there it reads nothing.  So if you are trying to read 10 characters into NAME and the only thing left at that position is 'FRED' then NAME will be missing instead of being set to 'FRED'.

 

Basically using TRUNCOVER eliminates the need for MISSOVER (with or without PAD).  Unless you really really really want SAS to throw away those short values you should always use TRUNCOVER and just forget that MISSOVER option even still exists.

 

If you do see MISSOVER in someone's code then triple check their INPUT statement and make sure it uses list mode only and not formatted/positional input.  That is if they have informat specifications in the INPUT statement then the informats MUST have the : (colon) modifier in front of them.  If they are reading from positions (input name $ 1-40; ) then make sure that it is ok that short values will become missing.

ManitobaMoose
Quartz | Level 8

Excellent explanation.

Essentially, Truncover can replace Missover and Pad. Now I also understand more about where the term Missover comes from. Thanks!

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
  • 2 replies
  • 737 views
  • 2 likes
  • 2 in conversation