Hello, in screen shot you can see that a value under "sex" column is missing, I have no idea what happened here, only I know is that "10240" is causing it. How to manage with that? I would like to get "10240" value under "type" column, and value "1" under "sex" column, the rest of rows should not change.
There is nothing in column 6 on the first line so SEX is read as missing.
You can fix the line by removing the space in column 5 and then SEX and the following values will be read right. But you would need to read TYPE from column one thru five instead of one thru four.
Since your data is separated by spaces just use list mode input instead of column mode.
If you do have any missing values on a line then use a period to represent them so the list mode sees at least something to read for that field in the line and does get out of sync. Use a period for either numeric or character variables. The normal informat for character variables will translate a single period into blank (missing) value.
There is nothing in column 6 on the first line so SEX is read as missing.
You can fix the line by removing the space in column 5 and then SEX and the following values will be read right. But you would need to read TYPE from column one thru five instead of one thru four.
Since your data is separated by spaces just use list mode input instead of column mode.
If you do have any missing values on a line then use a period to represent them so the list mode sees at least something to read for that field in the line and does get out of sync. Use a period for either numeric or character variables. The normal informat for character variables will translate a single period into blank (missing) value.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.