search across all the following databases:
Data and documentation
Common questions and answers.
Entire collection of data resources.
I have a zip code file that has all zip codes in the nation that I am merging to a person file. When I look at the merged file I see that there is no zip code information for the respondents who live in zip code 48103, which is a valid zip code. Why didn’t the merge work?
In your case, the problem is that for some reason your zip code file did not have information for each of the 10 items in your input statement. When SAS reached the tenth item it went to the next record and read the first item (zip code) on the next record as the tenth item. Your log file should have shown that you read in less records than expected.
To solve this you need to use the MISSOVER command in SAS:
More important, you need to determine why you do not have 10 items for each zip code. There should be no missing data for poverty counts within a zip code. There can be “0" values but these should be retained as zeroes rather than blanks. If you were reading with a fixed format the fact that zeroes have been replaced with blanks would not be an issue. However, if the record is shorter than the format specifies, SAS will go to the next record unless you use MISSOVER.