In response to requests from many customers, quarterly updates to the SASHELP.ZIPCODE data set are now available for you to download from the SAS Maps Online Web site.
The zip file provided in the download is a SAS data set in transport format, and you should use this file to replace your existing SASHELP.ZIPCODE data set.
The data set contains the following information:
- US ZIP codes and centroid xy coordinates for each code
- The variable, AreaCodes, which returns all area codes within a ZIP code
- The variable, Alias_City, which returns all cities within a ZIP code
Features of the SASHELP.ZIPCODE Data Set
ZIP Code Centroids
The SASHELP.ZIPCODE data set contains ZIP code centroids, or the geographic centers of the areas, defined by the ZIP codes. You can use centroids and associated data to:
- Calculate distances between ZIP codes and cities.
- Find nearest locations to a ZIP code.
- Perform address matching.
- Annotate locations on a map.
When merged with marketing data, the SASHELP.ZIPCODE data set can enhance a company’s marketing strategy to a significant degree.
SAS ZIP Code Functions
ZIPCITY is a SAS written function that utilizes the SASHELP.ZIPCODE file. It takes ZIPCODE as its argument and returns a title case city name and two-character postal code state abbreviation – for example – ZIPCITY(‘02138’) returns "Cambridge, MA".
There are some useful functions that are indirectly related to the ZIP code file:
- ZIPSTATE returns the uppercase two-character postal code for any five-character ZIP code argument.
- ZIPNAME returns the uppercase name of the state for any five-character ZIP code argument.
- ZIPNAMEL returns the mixed case name of the state for any five-character ZIP code argument.
- ZIPFIPS returns the two-digit numeric U.S. Federal Information Processing Standards (FIPS) code for any five-digit ZIP code argument.