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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: