Print Page as PDF
POSTAL CODE AND COUNTY CODE APIS ICR (3618)

POSTAL CODE AND COUNTY CODE APIS    ICR (3618)

Name Value
NUMBER 3618
IA # 3618
DATE CREATED 2002/07/11
CUSTODIAL PACKAGE KERNEL
CUSTODIAL ISC Albany
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XIPUTIL
NAME POSTAL CODE AND COUNTY CODE APIS
GENERAL DESCRIPTION
Allow access to look-up Postal Code and County Code
data based on supported API references.
STATUS Active
KEYWORDS
  • POSTAL
  • COUNTY
  • 5.12
  • 5.13
DURATION Till Otherwise Agreed
ID XIPUTIL
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
POSTAL
The POSTAL^XIPUTIL(PCODE,.XIP) entry point will
provide all data related to the postal code that is input.
VARIABLES TYPE VARIABLES DESCRIPTION
PCODE Input
Postal Code for which to return the data
XIP Output

XIP("POSTAL CODE") - the value used to lookup postal data
XIP("CITY") - the city that the USPS assigned to this PCODE
XIP("COUNTY") - The county associated with this PCODE
XIP("COUNTY POINTER") - pointer to the county in file #5.13
XIP("STATE") - The state associated with this PCODE
XIP("STATE POINTER") - pointer to the state in file #5
XIP("INACTIVE DATE") - date on which this PCODE was inactivated
XIP("FIPS CODE") - 5 digit FIPS code associated with the county
XIP("ERROR") - returns errors encountered during look-up
$$FIPS
This extrinsic function will return the 5-digit FIPS
code that uniquely identifies this county.  If the 5-digit FIPS code cannot be
determined, then "0^error message" is returned.
VARIABLES TYPE VARIABLES DESCRIPTION
PCODE Input
This is the Postal code for which a 5-digit FIPS code
will be found.
CCODE
The CCODE^XIPUTIL(FIPS,.XIPC) entry point will return
the XIPC array containing components related to the input FIPS county code.
VARIABLES TYPE VARIABLES DESCRIPTION
FIPS Input
FIPS - 5 digit FIPS County Code for which to return
the data
XIPC Output
The XIPC array will be returned with the following
subscripts:

XIPC("FIPS CODE") - 5 digit FIPS county code XIPC("COUNTY") - The county
associated with this FIPS code XIPC("STATE") - The state associated with this
FIPS code XIPC("STATE POINTER") - pointer to the state in file #5
XIPC("INACTIVE DATE") - date this FIPS code was inactivated XIPC("ERROR") -
returns errors encountered during look-up

$$FIPSCHK
This extrinsic function will determine if the 5-digit
FIPS county code that is passed in exists in the County Code (#5.13) file.  If
the FIPS code exists, then the 5.13 ien for this entry is returned.  If it
does not exist, then the returned value will be 0.
VARIABLES TYPE VARIABLES DESCRIPTION
FIPS Input
FIPS - Unique 5-digit FIPS county code associated
with the county to be checked.
POSTALB
This API returns all of the active ZIP Codes for a
single ZIP Code.

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
VARIABLES TYPE VARIABLES DESCRIPTION
PCODE Both
(required) Postal Code for which the data is being
requested.
.XIP(n) Both
(required) The number of primary subscripts in an
array: XIP(n,"CITY") City that the 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 File #5.13.  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 File #5.  XIP(n,"UNIQUE KEY") Unique lookup value.

XIP("ERROR") Errors encountered during lookup.
DATE ACTIVATED 2007/01/25