Converts ZIP codes to two-digit FIPS codes
Category: State and ZIP Code
ZIPFIPS ( zip-code )
zip-code
specifies a numeric or character expression that contains a five-digit ZIP code.
Tip: If the value of zip-code begins with leading zeros, you can enter the value without the leading zeroes. For example, if you enter 1040, ZIPFIPS assumes that the value is 01040.
The ZIPFIPS function returns the two-digit numeric U.S. Federal Information Processing Standards (FIPS) code that corresponds to its five-digit ZIP code argument.
The following SAS statements produce these results.
SAS Statements | Results |
---|---|
fips1=zipfips('27511'); put fips1; | 37 |
fips2=zipfips('01040'); put fips2; | 25 |
fips3=zipfips(1040); put fips3; | 25 |
fips4=zipfips(59017); put fips4; | 30 |
fips5=zipfips(24862); put fips5; | 54 |
Functions:
'ZIPCITY Function' on page 919
'ZIPNAME Function' on page 921
'ZIPNAMEL Function' on page 923
'ZIPSTATE Function' on page 924