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

M. Grany Southern Magnolia 85 15 E green
M. Disuzaa                             86 20 D rose
M. Manglic Lily      Magnolia   22 14 D purple
M. Dharmendra      Magnolia  25 3 D pink
M. Farukha Star     Magnolia 12 3 D black

 

in the above data,  i have a missing value in 2nd row. i know that we can read missing values by using missover with infile. but how to read inbetween missing values  using infile statement.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

More likely you need to change the INPUT statement.

It is not clear whether your data is in fixed columns or not.  If it is in fixed columns then you don't need to do anything.  If the values are free flowing then you either need either type a period where the missing value should be or switch to using a delimited file.  If you make a delimited file then make sure to use the DSD option so that adjacent delimiters are interpreted as denoting a missing value.

 

PS:  Don't use MISSOVER, unless you really want SAS to ignore values at the end of lines that are too short for the informat width being used.  Use TRUNCOVER instead.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

More likely you need to change the INPUT statement.

It is not clear whether your data is in fixed columns or not.  If it is in fixed columns then you don't need to do anything.  If the values are free flowing then you either need either type a period where the missing value should be or switch to using a delimited file.  If you make a delimited file then make sure to use the DSD option so that adjacent delimiters are interpreted as denoting a missing value.

 

PS:  Don't use MISSOVER, unless you really want SAS to ignore values at the end of lines that are too short for the informat width being used.  Use TRUNCOVER instead.

Kurt_Bremser
Super User

To get solid help for this, it is ABSOLUTELY necessary that you do NOT post your input data in the main posting window, but copy/paste it into a window opened with the </> button. Do not skip this.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 595 views
  • 0 likes
  • 3 in conversation