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

POSTALB^XIPUTIL(): Active ZIP Codes

Reference Type: Supported, Category: Address Hygiene, ICR#: 3618

Description

The POSTALB^XIPUTIL API returns all of the active ZIP codes for a single ZIP code.

Format

  POSTALB^XIPUTIL(pcode,.xip)

Input Parameters

pcode:

(required) Postal Code for which the data is being requested.

Output Parameters

.xip(n):

The number of primary subscripts in an array:

  • XIP(n,"CITY")—City that the United States Postal Service (USPS) assigned to this pcode. An asterisk (*) indicates which city is PREFERRED (DEFAULT).
  • XIP(n"CITY KEY")—USPS's assigned city key.
  • XIP(n,"CITY ABBREVIATION")—USPS's assigned abbreviation.
  • XIP(n,"COUNTY")—County associated with this pcode.
  • XIP(n,"COUNTY POINTER")—Pointer to the county in the COUNTY CODE (#5.13) file.
  • XIP(n,"FIPS CODE")—5-digit FIPS code associated with the county.
  • XIP(n,"POSTAL CODE")—Value used to look up postal data.
  • XIP(n,"PREFERRED CITY KEY")—USPS's PREFERRED (DEFAULT) city key.
  • XIP(n,"STATE")—State associated with this pcode.
  • XIP(n,"STATE POINTER")—Pointer to the state in the STATE (#5) file.
  • XIP(n,"UNIQUE KEY")—Unique lookup value.
  • XIP("ERROR")—Errors encountered during lookup.

Example

>S ZCODE=26452

>S ZTMP=""

D POSTALB^XIPUTIL(ZCODE,.ZTMP)

>ZW ZTMP,ZCODE
ZCODE=26452
ZTMP=2
ZTMP(1,"CITY")=WESTON*
ZTMP(1,"CITY ABBREVIATION")=
ZTMP(1,"CITY KEY")=X29362
ZTMP(1,"COUNTY")=LEWIS
ZTMP(1,"COUNTY POINTER")=335
ZTMP(1,"FIPS CODE")=54041
ZTMP(1,"POSTAL CODE")=26452
ZTMP(1,"PREFERRED CITY KEY")=X29362
ZTMP(1,"STATE")=WEST VIRGINIA
ZTMP(1,"STATE POINTER")=54
ZTMP(1,"UNIQUE KEY")=26452X29362
ZTMP(2,"CITY")=VALLEY CHAPEL
ZTMP(2,"CITY ABBREVIATION")=
ZTMP(2,"CITY KEY")=X2A444
ZTMP(2,"COUNTY")=LEWIS
ZTMP(2,"COUNTY POINTER")=335
ZTMP(2,"FIPS CODE")=54041
ZTMP(2,"POSTAL CODE")=26452
ZTMP(2,"PREFERRED CITY KEY")=X29362
ZTMP(2,"STATE")=WEST VIRGINIA
ZTMP(2,"STATE POINTER")=54
ZTMP(2,"UNIQUE KEY")=26452X2A444