zipinfoplus
zipinfoplus
ADDRESS1
,
ADDRESS2
,
CITY
,
STATE
,
ZIP
,
ZIPPLUSINFO

The zipinfoplus statement queries the web to obtain information about a zip code.

Parameters

This statement has six parameters:

address1 – first line of the address.

address2 – second line of the address.

city – name of city.

state – two letter state abbreviation.

zip – five digit zip code (optional, can be left empty).

zipplusinfo – Name of a field or variable that will receive a dictionary with information about the address (see discussion below)

Description

This statement queries the web to obtain information about a zip code. The information is returned in a dictionary that will contain one or more of the values listed below:

    ADDRESS ☞ Corrected street address
    CITY ☞ The primary name of the city associated with this address
    STATE ☞ State associated with this address
    ZIP9 ☞ Nine digit zip code
    COUNTY ☞ Name of the county associated with this address
    CARRIERROUTE ☞ Carrier route number associated with this address

This example checks an address in the database to see if it is correct. If it is completely invalid, an error message is displayed. If it is not formatted correctly by USPS rules, the database is corrected.

    local zinfo,correctAddress
    zipinfoplus Address,"",City,State,Zip,zinfo
    correctAddress=getdictionaryvalue(zinfo,"ADDRESS")
    if correctAddress=""
        message "Address is not valid!"
        rtn
    endif
    if correctAddress=Address rtn endif
    Address=correctAddress

See Also

- encodehttppostdata( -- converts a dictionary into HTTP post data.
- info("httpheaders") -- returns a dictionary with information about a just completed HTTP download.
- info("urltaskinfo") -- returns information about a just completed HTTP download.
- ipaddress -- returns the current IP address of the computer, or "" if not connected.
- loadurl -- loads a resource from the internet.
- loadurl( -- loads a resource from the internet.
- posturl -- loads a resource from the internet, with form data.
- posturl( -- loads a resource from the internet, with form data.
- url( -- synchronously loads a resource from the internet.
- urltask( -- asynchronously loads a resource from the internet.
- urltaskcancel -- aborts a download initiated with the urltask( function.
- urltaskstatus -- enables connection error checking in urltask( completion code.
- zipinfo -- queries the web to obtain information about a zip code.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama.