art photo

DSDR KB

Q:  

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?

A:  

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:

http://www.psc.isr.umich.edu/dis/data/prgmlib/sas/missover.html.

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.

Annotated Resources:

Direct Links:

Related Question Groups:


W A R N I N G

If you are reading this, it may be that you are using rather old web browsing software that does not support modern international Web technology standards. For a better experience of the Web and this site in particular, please upgrade your web browser software. The following are good choices:

Firefox
Opera
Safari