Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

POSTAL^XIPUTIL(): ZIP Code Information

Reference Type: Supported, Category: Address Hygiene, Integration Agreement: 3618

Description

This API returns United States Postal Service (USPS)-related data/information in an output array (see Output) for the preferred (default) ZIP Code.

Format

  POSTAL^XIPUTIL(pcode,.xip)

Input Parameters

pcode:

(required) Postal Code for which data is returned.

Output Parameters

.xip:

An array containing the following:

XIP("CITY")—City that the USPS assigned to this PCODE.
XIP("CITY ABBREVIATION")—USPS's assigned abbreviation.
XIP("CITY KEY")—USPS's assigned city key.
XIP("COUNTY")—County associated with this PCODE.
XIP("COUNTY POINTER")—Pointer to the county in File #5.13.
XIP("FIPS CODE")—5-digit FIPS code associated with the county.
XIP("INACTIVE DATE")—Date FIPS Code inactive.
XIP("LATITUDE")—Latitude.
XIP("LONGITUDE")—Longitude.
XIP("POSTAL CODE")—Value used to look up postal data.
XIP("PREFERRED CITY KEY")—USPS's preferred (DEFAULT) city key.
XIP("STATE")—State associated with this PCODE.
XIP("STATE POINTER")—Pointer to the state in File #5.
XIP("UNIQUE KEY")—Unique lookup value.

XIP("ERROR")—Errors encountered during lookup.

Example 1

>S ZCODE=94114

>S ZTMP=""

>D POSTAL^XIPUTIL(ZCODE,.ZTMP)

>ZW ZTMP,ZCODE
ZCODE=94114
ZTMP=
ZTMP("CITY")=SAN FRANCISCO
ZTMP("CITY ABBREVIATION")=
ZTMP("CITY KEY")=Z22802
ZTMP("COUNTY")=SAN FRANCISCO
ZTMP("COUNTY POINTER")=2910
ZTMP("FIPS CODE")=06075
ZTMP("INACTIVE DATE")=
ZTMP("LATITUDE")=39:00N
ZTMP("LONGITUDE")=80:28W
ZTMP("POSTAL CODE")=94114
ZTMP("PREFERRED CITY KEY")=Z22802
ZTMP("STATE")=CALIFORNIA
ZTMP("STATE POINTER")=6
ZTMP("UNIQUE KEY")=94114Z22802

Example 2

>S ZCODE=94612

>S ZTMP=""

>D POSTAL^XIPUTIL(ZCODE,.ZTMP)

>ZW ZTMP,ZCODE
ZCODE=94612
ZTMP=
ZTMP("CITY")=OAKLAND
ZTMP("CITY ABBREVIATION")=
ZTMP("CITY KEY")=Z22296
ZTMP("COUNTY")=ALAMEDA
ZTMP("COUNTY POINTER")=2912
ZTMP("FIPS CODE")=06001
ZTMP("INACTIVE DATE")=
ZTMP("POSTAL CODE")=94612
ZTMP("PREFERRED CITY KEY")=Z22296
ZTMP("STATE")=CALIFORNIA
ZTMP("STATE POINTER")=6
ZTMP("UNIQUE KEY")=94612Z22296

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.