Reference Guide#
Introduction#
Clean up contact data, removing bad or incomplete information before it invades your database and creates a negative impact on your data-driven initiatives. You’ll reduce undeliverables, increase communication efforts, and save money on all your direct marketing and CRM campaigns.
Address Object is available for Microsoft Windows, Linux, Solaris SPARC, HP-UX, and AIX. It can be used with virtually any programming language that supports object-oriented programming, such as Visual Basic, C++, and C.
Address Object’s functionality is divided into four interfaces: AddressCheck; Parse; StreetData; and ZipData.
AddressCheck can verify that an address is a properly formatted address that matches a true and valid point of delivery using the DPV database. It also matches the address to the LACSLink file to determine if the address has been converted (usually from a rural route to a standard city-street address) and automatically updates the address.
The CASS Certified address checking logic includes DPV and LACSLink processing, mandatory to qualify your mailings for postal discounts by appending the ZIP + 4 codes to only validated addresses. Address Object also generates Form 3553 required by the Postal Service to claim the discounts.
The AddressCheck interface also enhances your address data by providing additional information, such as Congressional District, County name and FIPS code, time zone, and several others.
If Address Object is purchased with the Canadian Address option, the AddressCheck can be used to verify Canadian addresses.
The Parse interface breaks down a street address into its component parts, such as street number, directional (S, NW and so on), street name and suffix (ST, RD, BLVD).
If the first pass does not yield the expected results because the street address follows a non-standard format, the ParseNext function will offer an alternate parsing.
The AddressCheck interface also parses the submitted data, but the Parse interface can be used without initializing the data files required for AddressCheck, making Parse faster to use when full address checking is not necessary.
This interface can also parse Last Line data (city, state and ZIP Code) into separate parts. This is handy if your address data comes to you as lines of plain text instead of discrete fields.
If Address Object is purchased with the Canadian Address option, the Parse interface can be used to parse Canadian addresses.
The StreetData interface can match a street name or just a partial name against a ZIP Code and return the known valid address ranges that match that pattern.
Used in conjunction with the AddressCheck interface, StreetData can be used to match incorrect or misspelled addresses to a valid address range. For example, if “123 Main Ave” is not a valid address for the ZIP Code, the StreetData interface can determine that the number 123 falls within a valid range for “Main St,” allowing you to use an address record that would otherwise result in an undeliverable mail piece.
If Address Object is purchased with the Canadian Address option, the StreetData interface can be used with Canadian addresses.
The ZipData interface performs several functions, matching geographic data to ZIP Code and city information.
First, the FindZip function returns geographic data about one or more city names that match the input ZIP Code, including automation (or carrier route) information, county name and FIPS code, postal facility type, official “last line” indicator, and latitude/longitude for each match. The FindZipInCity functions can return the same information for every ZIP Code that matches that input city and state combination. The FindCityInState functions can determine if the input full or partial city name matches a valid city name with the state. This can be useful to help correct misspelled city names in your mailing list.
If Address Object is purchased with the Canadian Address option, the ZipData interface can be used with Canadian postal codes, cities, and provinces.
ADD-ONS TO ADDRESS OBJECT
Canadian Address Add-On - Increase the accuracy of your Canadian addresses. Use this API with your custom PC & Web applications to validate, correct and standardize Canadian addresses and qualify your mailings to meet Canada Post requirements.
RBDI (Residential Business Delivery Indicator) - Most shipping carriers charge a higher price for residential deliveries. RBDI helps ensure that you select the most cost-effective method for shipping parcels by identifying residential addresses… therefore maximizing your savings potential.
AddressPlus - AddressPlus goes beyond the Post Office’s SuiteLink product, appending missing secondary address information to millions of business and residential addresses.
eLOT - This feature appends enhanced Line-of-Travel numbers to addresses for improved presorting and greater postage discounts when used in conjunction with Melissa Data’s Presort Object.
Melissa’s Address Object cleans up bad and incomplete contact data. This can help you reduce undeliverables, increase communication, and save money on direct marketing and CRM campaigns.
To do this, the Address Object is broken into four different interfaces:
AddressCheck Interface - Verifies address data and formatting.
StreetData Interface - Matches street names against ZIP Code to return valid address ranges.
ZipData Interface - Matches geographic data to ZIP Code and city information.
Parse Interface - Breaks down a street address into its component parts.
For far more information, continue reading deeper into this document!
Setup and List of Files#
To see how to set up the Address Object, the list of files that will be downloaded and used, and the system requirements to run the Object, please visit the GitHub Sample Code.
Methods#
AddressCheck Interface#
Initialization - Set#
The following functions set the paths to the necessary data files, the license, and initialize the AddressCheck Interface:
InitializeDataFiles#
- Syntax:
InitializeDataFiles();
- Returns:
Initialization Status
- Return Type:
ProgramStatus
The InitializeDataFiles function opens the needed data files and prepares the Address Object for use.
- Remarks
Once you set the data file paths you need to initialize them to load them and ensure everything is working. If not using an environment variable, you must also call the SetLicenseString function.
Check the return value of the GetInitializeErrorString function to retrieve the description for the result of the initialization call. Any result other than “No Error” means the initialization failed for some reason. It’s important to do this step since the data files are integral to the functionality of Address Object.
- Required Functions
You must successfully call either the SetPathToUSFiles, the SetPathToCanadaFiles, or both functions in order to successfully call the InitializeDataFiles function.
- Return Value
This function returns a value of the enumerated type ProgramStatus.
Code
Description
0
No error - initialization was successful.
1
Could not open the mdAddr.dat file.
2
Could not open the mdAddr.nat or mdAddr.str file.
4
The internal database date of the mdAddr.dat and mdAddr.nat files do not match.
5
Not all the memory buffers could be initialized.
6
Unknown error.
7
Error in Canada File.
8
Expired Database.
9
Canadian Database expired.
10
DPV data files error.
11
RBDI data files error.
12
RBDI and US Data File dates do not match.
13
LACSLink data files error.
14
SuiteLink data files error.
15
AddressPlus data files error.
If any other value other than NoError is returned, check the GetInitializeErrorString function to see the reason for the error.
SetCASSEnable#
- Syntax:
SetCASSEnable();
- Return Type:
Void
U.S. Only - Enables or disables full CASS Certified address verification. This option is disabled by default.
- Remarks
When the value passed to this function is TRUE, Address Object performs full CASS Certified address verification, including DPV, when the VerifyAddress function is called.
This function must be called before the InitializeDataFiles function is called.
If the Boolean parameter passed to this function is TRUE: * Linking to DPV, LACSLink and SuiteLink data files is required to initialize. * If an address cannot be DPV verified, the address will not be ZIP + 4 coded by the VerifyAddress function. * A CASS Form 3553 can be generated.
If the parameter passed to this function is FALSE: * Linking to DPV, LACSLink and SuiteLink data files is optional. * The GetPlus4 function will return a value for all Addresses verified to ZIP + 4 level or higher. * A CASS Form 3553 cannot be generated. * By default, CASS processing is disabled and must be explicitly enabled by passing TRUE to this function.
SetLicenseString#
- Syntax:
SetLicenseString(String License);
- Returns:
Is License Valid
- Return Type:
Boolean
This function sets the license string required to enable Address Object’s complete functionality.
- Remarks
The license string is included with the documentation you received. If you have not purchased a license, call Melissa Data toll free at 800-MELISSA ext. 3 (800-635-4772 ext. 3) or send an email to Sales@Melissa.com.
The License String is a software key that unlocks the full functionality of the component.
The license string is normally set using an environment variable, MD_LICENSE. Calling SetLicenseString is an alternative method for setting the license string, but applications developed for a production environment should only use the environment variable.
When using an environment variable, it is not necessary to call the SetLicenseString function.
For more information on setting the environment variable, see page 2 of this guide.
If a valid license string function is not set, Address Object will not operate.
- Input Parameters
The SetLicenseString function has one parameter:
- LicenseString:
A string value representing the software license key.
- Return Value
The SetLicenseString function returns a Boolean value of 0 (FALSE) or 1 (TRUE). It will return a FALSE Boolean value if the license string provided is incorrect.
SetPathToAddrKeyDataFiles#
- Syntax:
SetPathToAddrKeyDataFiles(string FilePath);
- Return Type:
Void
This function accepts a string value parameter that sets the path to the Melissa Address Key (MAK) files.
- Remarks
To use the Meilssa proprietary persistent unique identifier, enable this data path.
SetPathToCanadaFiles#
- Syntax:
SetPathToCanadaFiles(String FilePath);
- Return Type:
Void
Canada Only - This function must be set to the path to the following files used for Canadian address validation:
mdCanada3.db
For information about purchasing the Canadian add-on, call 1-800-MELISSA.
- Remarks
You do not need to call this function if you are only coding U.S. addresses.
The Canadian data files expire every 30 days, in accordance with Canada Post regulations. If you do not receive an e-mail notification instructing you to download the most current Canadian data files, please contact your sales representative.
SetPathToDPVDataFiles#
- Syntax:
SetPathToDPVDataFiles(String FilePath);
- Return Type:
Void
U.S. Only - Required for CASS Processing. The string passed to this function must contain the path to the following files, which are required for DPV:
dph.hsa dph.hsx dph.hsv
dph.hsf dph.hsc dph.dte
lcd
- Remarks
If this path is not set, DPV matching of your addresses will not occur. DPV is available for U.S. addresses only.
Note: The date of the DPV files must match the date of the ZIP + 4 file in the path passed to SetPathToUSFiles function.
SetPathToLACSLinkDataFiles#
- Syntax:
SetPathToLACSLinkDataFiles(String FilePath);
- Return Type:
Void
U.S. Only - Required for CASS Processing. The string passed to this function must contain the path to the following file used by the LACSLink features:
mdLACS.dat
- Remarks
Some rural route addresses are modified to city-style addresses to allow emergency services (for example, ambulance, police, fire, and so on) to find these addresses more efficiently.
The LACSLink service matches the old address with the updated address and corrects it as part of the Address Check process.
If this path is not set, LACSLink correction of your addresses will not occur. LACSLink is available for U.S. addresses only.
SetPathToRBDIFiles#
- Syntax:
SetPathToRBDIFiles(String FilePath);
- Return Type:
Void
U.S. Only - The string passed to this function must contain the path to the following data file, which is required for the GetRBDI function:
mdRBDI.dat
For information about purchasing the RBDI add-on for Address Object, call 1-800-MELISSA.
- Remarks
If this path is not set, the VerifyAddress function will not populate the GetRBDI function. RBDI is available for U.S. addresses only.
The RBDI files must have been included with the same update as the ZIP + 4 files in the path passed to the SetPathToUSFiles function.
SetPathToSuiteFinderDataFiles#
- Syntax:
SetPathToSuiteFinderDataFiles(String FilePath);
- Return Type:
Void
The string passed to this function must contain the path to following data files, which is required to use the AddressPlus add-on:
mdSuiteFinder.db
- Requires
AddressPlus add-on for Address Object
For information about purchasing the AddressPlus add-on for Address Object, call 1-800-MELISSA.
- Remarks
If this path is not set, the VerifyAddress function will not return an appended residential suite number, if available. AddressPlus is available for U.S. addresses only.
SetPathToSuiteLinkDataFiles#
- Syntax:
SetPathToSuiteLinkDataFiles(String FilePath);
- Return Type:
Void
U.S. Only - Required for CASS Processing. The string passed to his function must contain the path to the following file, which isrequired for SuiteLink:
mdSteLink.dat
- Remarks
If this path is not set, SuiteLink matching or updating of your addresses will not occur. SuiteLink is required for CASS Processing as of CASS Cycle M, 2009. SuiteLink is available for U.S. addresses only.
Note: The date of the SuiteLink files must match the date of the ZIP + 4 file in the path passed to the SetPathToUSFiles function.
SetPathToUSFiles#
- Syntax:
SetPathToUSFiles(String FilePath);
- Return Type:
Void
U.S. Only - Required for CASS Processing. The string passed to this function must contain the path to the data files required for U.S. address verification:
mdAddr.dat mdAddr.nat mdAddr.str
mdAddr.lic
- Remarks
You do not need to call this function if you are only coding Canadian addresses with the Canadian add-on.
Initialization - Get#
The following functions get values related to the initialization process.
GetBuildNumber#
- Syntax:
GetBuildNumber();
- Returns:
Build Number
- Return Type:
String
The GetBuildNumber function returns the current development release build number of Address Object.
- Remarks
This is usually a three or four-character string. If you are running the Demo version of Address Object, the word DEMO will be appended to the build number.
- Return Value
The GetBuildNumber function returns a string value containing the current development release build number of the Address Object.
GetCanadianDatabaseDate#
- Syntax:
GetCanadianDatabaseDate();
- Returns:
Canadian Database Date
- Return Type:
String
Canada Only - The GetCanadianDatabaseDate function returns a value representing the date of your Canadian data files. This date allows you to confirm that the data files you are using are the latest available.
- Remarks
If the GetCanadianDatabaseDate function is called before the InitializeDataFiles function is called, this function will return a date outside the normal range of the system date, such as 1969 or 1899, depending on the system.
- Return Value
The GetCanadianDatabaseDate function returns a string value representing the date of the Canadian data files.
GetCanadianExpirationDate#
- Syntax:
GetCanadianExpirationDate();
- Returns:
Canadian Database Expiration Date
- Return Type:
String
Canada Only - The GetCanadianExpirationDate function returns a date value representing the date your Canadian data files expire. This date allows you to confirm that the data files you are using are the latest available.
- Remarks
If the GetCanadianExpirationDate function is called before the InitializeDataFiles function is called, this function will return a date outside the normal range of the system date, such as 1969 or 1899, depending on the system.
- Return Value
The GetCanadianExpirationDate function returns a string value representing the expiration date of the Canadian data files.
GetDatabaseDate#
- Syntax:
GetDatabaseDate();
- Returns:
US Database Date
- Return Type:
String
The GetDatabaseDate function returns the date of your U.S. address data files. This date allows you to confirm that the data files you are using are the latest available.
- Remarks
If the GetDatabaseDate function is called before the InitializeDataFiles function is called, and the data files are not in the same directory as Address Object, this function will return a date outside the normal range of the system date, such as 1969 or 1899, depending on the system.
- Return Value
The GetDatabaseDate function returns a string value that represents the date of your address data files.
GetExpirationDate#
- Syntax:
GetExpirationDate();
- Returns:
US Database Expiration Date
- Return Type:
String
U.S. Only - The GetExpirationDate function returns a date value representing the date when the current U.S. data files expire. This date enables you to confirm that the data files you are using are the latest available.
- Remarks
If the GetExpirationDate function is called before the InitializeDataFiles function is called, this function will return a date outside the normal range of the system date, such as 1969 or 1899, depending on the system.
- Return Value
The GetExpirationDate function returns a string value representing the expiration date of the U.S. data files.
GetInitializeErrorString#
- Syntax:
GetInitializeErrorString();
- Returns:
Error Description
- Return Type:
String
This function returns a descriptive string value to describe the error from the InitializeDataFiles function.
- Remarks
The GetInitializeErrorString function returns a string value describing the error caused when the InitializeDataFiles function cannot be called successfully
GetLicenseExpirationDate#
- Syntax:
GetLicenseExpirationDate();
- Returns:
License Expiration Date
- Return Type:
String
This function returns a string value containing the expiration date of the current license string.
- Remarks
Call this function to determine when your current license will expire. After this date, Address Object will no longer function.
GetRBDIDatabaseDate#
- Syntax:
GetRBDIDatabaseDate();
- Returns:
RBDI Database Date
- Return Type:
String
U.S. Only - The GetRBDIDatabaseDate function returns a date value representing the date of your RBDI data files. This date allows you to confirm that the data files you are using are the latest available.
- Requires
RBDI add-on for Address Object
For more information about purchasing the RBDI add-on for Address Object, call 1-800-MELISSA.
- Remarks
If the GetRBDIDatabaseDate function is called before the InitializeDataFiles function is called, this function will return a date outside the normal range of the system date, such as 1969 or 1899, depending on the system.
- Return Value
The GetRBDIDatabaseDate function returns a string value representing the date of the RBDI data files.
Options#
The following functions enable or disable the optional functionality of the AddressCheck Interface:
SetAliasMode#
- Syntax:
SetAliasMode(AliasPreserveMode mode);
- Return Type:
Void
This function controls how Address Object handles a nickname or former name of street inputs, and if they will be converted to the preferred street name or be preserved.
- Remarks
The SetAliasMode function accepts one of two set values of the type AliasPreserveMode. These values are:
- ConvertAlias (Default)
Nickname or former name street inputs will be converted to their USPS preferred street name during the verification process. This is the default setting.
- PreserveAlias
Nickname or former name street inputs will be preserved during the verification process.
SetDiacritics#
- Syntax:
SetDiacritics(DiacriticsMode p1);
- Return Type:
Void
Canada Only - This takes an enumerated value to determine how AddressCheck will handle diacritic characters in French words for addresses located in Quebec.
- Remarks
The SetDiacritics function accepts a single value that sets how Address Object will handle diacritic characters in French words for addresses located in Quebec. For programming languages that handle enumerated values, this parameter uses the data type DiacriticsMode.
Enumerated |
Integer |
Description |
---|---|---|
Value |
Value |
|
Auto |
0 |
If the input value contains diacritic characters, Address Object will use diacritics in the output. If it does not, it will not use diacritics. |
On |
1 |
The return values will always have diacritics and all addresses will be returned in the French format |
Off |
2 |
The return values will never have diacritics and all addresses will be returned in the English format. |
Languages that do not use enumerations will use the equivalent integer value.
SetStandardizationType#
- Syntax:
SetStandardizationType(StandardizeMode mode);
- Return Type:
Void
This takes an enumerated value to determine how AddressCheck handles the abbreviations of suffixes and directionals when standardizing a street address.
- Remarks
The SetStandardizationType function accepts an enumerated value of the type StandardizeMode. There are three settings:
ShortFormat (0) - The street address is returned with directionals and suffixes shortened according to postal standards. This is the default setting.
LongFormat (1)- The street address is returned with directionals and suffixes spelled out rather than abbreviated.
AutoFormat (2)- The street address is returned with the abbreviation or non-abbreviation of the directionals and suffixes preserved. If any of these components need to be corrected and replaced, the replacement will preserve the original standardization.
SetSuiteParseMode#
- Syntax:
SetSuiteParseMode(SuiteParseMode mode);
- Return Type:
Void
This function controls how Address Object handles whether or not the suite information will be parsed out into its own field or appended to the end of the Address1 line after VerifyAddress().
- Remarks
The SetSuiteParseMode function accepts one of two set values of the type SuiteParseMode.These values are:
- ParseSuite (Default)
The suite will be parsed out into the suite field after VerifyAddress(). This is the default setting.
- CombineSuite
The suite will be appended to the end of the Address1 line after VerifyAddress().
SetUseUSPSPreferredCityNames#
- Syntax:
SetUseUSPSPreferredCityNames(int p1);
- Return Type:
Void
U.S. Only - When the Boolean value passed to this function is TRUE, the VerifyAddress function will always return the preferred city name for the submitted address, regardless of whether or not an approved vanity name was sent to the function.
- Remarks
For every city, there is an official name that is preferred by the U.S. Postal Service. There may be one or more unofficial or “vanity” names in use. Normally, Address Object allows you to verify addresses using known vanity names. If the value passed to this function is TRUE, Address Object will substitute the preferred city name for any vanity name when it verifies an address.
Options - Set Forms#
The following functions set values for the optional CASS Form 3553 of the AddressCheck Interface:
SetPS3553_D3_Address#
- Syntax:
SetPS3553_D3_Address(String address);
- Return Type:
Void
This function sets the street address of the list owner for CASS Form processing. Used to populate item D3 on CASS Form 3553.
SetPS3553_D3_City#
- Syntax:
SetPS3553_D3_City(String city);
- Return Type:
Void
This function sets the name of the city from the address of the list owner. Required to populate item D3 on CASS Form 3553.
SetPS3553_D3_Company#
- Syntax:
SetPS3553_D3_Company(String company);
- Return Type:
Void
This function sets the name of the company that either owns the list or for whom the mailing is being prepared. Used to populate item D3 on CASS Form 3553.
SetPS3553_B4_ListName#
- Syntax:
SetPS3553_B4_ListName(String listName);
- Return Type:
Void
This function sets the name or identification number of the address list. If more than one list is used, this function is left blank. If the identification number is used, it must be preceded by “ID#.”
Used to generate item B4 on CASS Form 3553.
SetPS3553_D3_Name#
- Syntax:
SetPS3553_D3_Name(String name);
- Return Type:
Void
This function sets the name of the list owner. Used to populate item D3 on CASS Form 3553.
SetPS3553_B1_ProcessorName#
- Syntax:
SetPS3553_B1_ProcessorName(String processorName);
- Return Type:
Void
This function sets the name of the company that coded the address list(s) and/or used the Address Object to perform ZIP + 4 matching. You may attach a list to the generated CASS Form if more space is required.
Used to populate item B1 on CASS Form 3553.
SetPS3553_D3_State#
- Syntax:
SetPS3553_D3_State(String state);
- Return Type:
Void
This function sets the name of the state from the mailing address of the list owner. Used to populate item D3 on CASS Form 3553.
SetPS3553_D3_ZIP#
- Syntax:
SetPS3553_D3_ZIP(String zip);
- Return Type:
Void
This function sets the ZIP Code from the mailing address of the list owner. Used to populate item D3 on CASS Form 3553.
SetSOACustomerInfo#
- Syntax:
SetSOACustomerInfo(String CustName, String CustAddress);
- Return Type:
Void
This function sets the company name and mailing address for use on a Summary of Addresses report. Remarks This function must be called before generating the Summary of Addresses with the GetFormSOA or SaveFormSOA functions. Input Parameters The SOASetCustomerInfo function accepts two string values as parameters:
CustName |
The company name that appears on the mailers Canada Post contract. |
CustAddress |
The mailing address that appears on the mailers Canada Post contract. |
SetSOACPCNumber#
- Syntax:
SetSOACPCNumber(String CPCNumber);
- Return Type:
Void
This function accepts a string value containing the Canada Post Contract number that must appear on the Summary of Addresses.
- Remarks
The CPC Number is an eight-digit number that appears on your Canada Post contract.
Set Inputs#
The following functions supply the address information to be verified by a call to the VerifyAddress function. After the function call, the return values of these functions will be populated with the verified and standardized address data:
ClearProperties#
- Syntax:
ClearProperties();
- Return Type:
Void
This function clears all of the stored address information values of the AddressCheck Interface.
- Remarks
Call this function before calling the address setting functions with the next address to verify.
Calling this function ensures that the data for each verified address belongs only to that address.
SetAddress#
- Syntax:
SetAddress(String address);
- Return Type:
void
This function sets the delivery address associated with the input address
- Remarks
This function is required for a successful call to the VerifyAddress function
SetAddress will typically contain the primary street address (Street number, street name, plus any directionals and street suffixes). It can contain a secondary address (suite number, address number, unit number, or a private mailbox located at a CMRA).
SetAddress2#
- Syntax:
SetAddress2(String addressLine2);
- Return Type:
Void
Passes a second address line associated with the input address.
- Remarks
This function is supplied by the user and is optional. The string value passed to SetAddress2 can contain either a suite or a different, secondary address such as a P.O. Box.
If the VerifyAddress function detects a common suite name such as #, APT, STE, and so on, it will append it to the end of the value passed to the SetAddress function before attempting to verify the address.
If the address passed via the SetAddress function is not verifiable and a separate and complete verifiable address is passed to the SetAddress2 function, the parameters passed to the SetAddress and the SetAddress2 functions will be swapped and the value originally passed to the SetAddress2 function will be used to verify the address.
- Example #1:
The value passed to the SetAddress function was not verifiable, therefore the value passed to the SetAddress2 function was verified and the values passed to the SetAddress and SetAddress2 functions were swapped.
- Input:
- SetAddress(“123 Main St Apt 10)” (cannot be verified)SetAddress2(“PO Box 223”) (can be verified)
- Output:
- GetAddress = “PO Box 223”GetAddress2 = “123 Main St Apt 10”
- Example #2:
The value passed to the SetAddress function could be verified, so the value passed to SetAddress2 was not considered.
- Input:
- SetAddress(“PO Box 223”) (could be verified)SetAddress2(“123 Main St Apt 10”) (not looked at)
- Output:
- GetAddress = “PO Box 223 “GetAddress2 = “123 Main St Apt 10”
SetCity#
- Syntax:
SetCity(String city);
- Return Type:
Void
This function accepts a string containing the name of the city or municipality associated with the address to be verified.
- Remarks
The SetCity function is optional if you provide the correct ZIP or Postal Code via the SetZip function. If you do not provide a ZIP or Postal Code, the SetCity and SetState functions are required to successfully check an address.
If the SetCity function is not used, the address checking logic will use the official city or municipality name of the ZIP or Postal Code instead.
If the SetCity function is supplied, the address checking logic will only change the city or municipality name if it is an incorrect or unapproved mailing name. In these cases, the official city or municipality name for the ZIP or Postal Code will be returned. However, if the official city or municipality name or an approved vanity name for the ZIP or Postal Code is entered, the address checking logic will return that city as entered.
If the supplied city and state do not match the ZIP or Postal Code, the address checking logic will give preference to the city name. Matches will be attempted within the supplied city instead of the ZIP or Postal Code. This logic is based on the assumption that a ZIP or Postal Code with one typo will result in more incorrect address matches than a city name with a few typos.
SetCompany#
- Syntax:
SetCompany(String company);
- Return Type:
Void
This function sets the company prior to a call to the VerifyAddress function.
- Remarks
The SetCompany function accepts a string value containing an optional company name.
If a company name is supplied for a company that has been assigned a specific Plus4 by the USPS, the address checking logic will return a more accurate Plus4 code.
If a company name is not supplied, the address checking logic will still be able to code the address but it will supply a more generic “street level default” Plus4.
The VerifyAddress function will not change the company name supplied by the user.
SuiteLink and the AddressPlus add-on enable Address Object to assign the suite information tied to the Company Name. If a company name is supplied for a company that has been assigned a specific suite, then the return value of the GetSuite function will be populated with the suite information
SetCountryCode#
- Syntax:
SetCountryCode(String countryCode);
- Return Type:
Void
This function sets a two-character abbreviation that indicates the country associated with the input address. The value passed to this function can optionally be included with the input address.
- Remarks
Address Object includes data for American and Canadian addresses, therefore the values “US” or “CA” are expected. We will also look for other variations of US or CA, but the two character code is recommended.
If there is no country code, the engine will assume it is either US or CA and use the postal code to determine the country. Other countries rather than the United States or Canada will have the engine return AS09 for foreign address.
SetLastLine#
- Syntax:
SetLastLine(String lastLine);
- Return Type:
Void
This function sets the city, state and ZIP Code combination from a single string value.
- Remarks
You can use this function as an alternative function to calling the SetCity, SetState, and SetZip functions individually. For example, pass “Rancho Santa Margarita, CA 92688-2212” to SetLastLine rather than passing “Rancho Santa Margarita” to the SetCity function, “CA” to the SetState function, and “92668” to the SetZip function.
This function is useful if you have address data that is composed of lines of plain text and the City, State, and ZIP codes do not have their own separate fields.
SetLastName#
- Syntax:
SetLastName(String lastName);
- Return Type:
Void
This function sets the last name associated with a residential address. This function is required to use the AddressPlus add-on.
- Remarks
AddressPlus is an add-on that enables Address Object to assign suite numbers for some residential addresses. In addition to the basic address information (SetAddress, SetCity, SetState, and SetZip functions), you must also submit a correct last name associated with the address record to enable Address Object to distinguish the record from other suites at the same address.
SetPlus4#
- Syntax:
SetPlus4(String zip);
- Return Type:
Void
U.S. Only - This function sets the four-digit ZIP Code add-on associated with the input address.
- Remarks
This function is optional. When correcting addresses, it is usually ignored. However, if the input ZIP Code is a “unique” ZIP Code (a ZIP Code that is assigned to one company), the input Plus4 code will be retained under certain circumstances.
If the user does not supply the Plus4, the address checking logic will still code the address, but it may use a “default” Plus4 code for these “unique” ZIP codes.
SetState#
- Syntax:
SetState(String state);
- Return Type:
Void
This function sets the two-letter state or province abbreviation associated with the input address.
Remarks The state is an optional value only when you provide the correct ZIP or Postal Code. If you do not provide a ZIP or Postal Code, the SetCity and SetState functions will be required to successfully check an address.
SetSuite#
- Syntax:
SetSuite(String suite);
- Return Type:
Void
This function sets the suite name and number associated with the input address.
- Remarks
If the address being verified contains a suite number, that value can be attached to the end of the street address passed via the SetAddress function or passed separately using this function.
SetUrbanization#
- Syntax:
SetUrbanization(String countryCode);
- Return Type:
Void
Puerto Rico Only - This function sets an urbanization name associated with the input address. This function applies to Puerto Rican addresses only.
- Remarks
The SetUrbanization function is only used when attempting to correct addresses in Puerto Rico. If it is not called, the address checking logic will still be able to code some records, but it may produce more multiple matches than usual for Puerto Rican addresses. This happens because the urbanization name is used to break ties when a ZIP Code is linked to multiple instances of the same address.
The urbanization name tells the address checking logic which “neighborhood” to look in if more than one likely address candidate is found.
If just one address is found, the address checking logic can correct the address and return the urbanization name.
SetZip#
- Syntax:
SetZip(String zip);
- Return Type:
Void
This function sets the five-digit or nine-digit U.S. ZIP Code or the six-character Canadian Postal Code associated with the input address. If this function is called, the SetCity and SetZip functions are optional.
- Remarks
The ZIP or Postal Code is only optional when you provide the correct city/municipality and state/province. If you do not provide a city/municipality and state/province, the ZIP Code will be required to successfully check an address.
Parsed Input Functions#
The following functions are not always used for address verification. The SetLastName function is used if you are using Address Object with the AddressPlus option. The parsed address functions can be used in place of the SetAddress, SetAddress2, and SetSuite functions if your address information is already parsed:
SetParsedAddressRange#
- Syntax:
SetParsedAddressRange(String addressRange);
- Return Type:
Void
This function sets the delivery number of a street address.
- Remarks
This function accepts a 10-character maximum string value. It can be used to pass the range portion of an address that has already been parsed instead of using the SetAddress function.
SetParsedDeliveryInstallation#
- Syntax:
SetParsedDeliveryInstallation(String deliveryInstallation);
- Return Type:
Void
Canada Only - This function sets the Delivery Installation information from a parsed Canadian street address.
- Remarks
The delivery installation is the post office facility responsible for delivering to the current address. It is often used for rural addresses or when multiple post offices service the same municipality.
SetParsedLockBox#
- Syntax:
SetParsedLockBox(String lockBoxInfo);
- Return Type:
Void
Canada Only - This function sets the Lock Box information from a parsed Canadian street address.
- Remarks
A lock box is the Canadian equivalent of a Post Office Box in the U.S. (The two terms are often used interchangeably in Canada).
SetParsedPostDirection#
- Syntax:
SetParsedPostDirection(String postDirection);
- Return Type:
Void
This function sets any directional that follows the street name of a submitted street address.
- Remarks
This function accepts a two-character maximum string value to pass the post-directional portion of an already parsed address to the AddressCheck Interface.
Possible values which can be passed to this function are: “N,” “NE,” “E,” “SE,” “S,” “SW,” “W,” and “NW.”
SetParsedPreDirection#
- Syntax:
SetParsedPreDirection(String preDirection);
- Return Type:
Void
This function sets the directional that precedes the street name of a submitted street address.
- Remarks
This function accepts a two-character maximum string value to pass the pre-directional portion of a parsed address to the AddressCheck Interface.
SetParsedRouteService#
- Syntax:
SetParsedRouteService(String routeService);
- Return Type:
Void
Canada Only - This function sets the route service information from a parsed Canadian street address.
- Remarks
Route service is a term used to refer to what the USPS would call a Rural Route address.
SetParsedStreetName#
- Syntax:
SetParsedStreetName(String streetName);
- Return Type:
Void
This function sets the street name portion of an address.
- Remarks
This function accepts a maximum 28-character string containing the street name portion of an address to be verified.
SetParsedSuffix#
- Syntax:
SetParsedSuffix(String suffix);
- Return Type:
Void
This function sets the street suffix portion of an address.
- Remarks
This function accepts a four-character maximum string value containing the suffix portion of a street address to be verified.
Typical suffix values might include: “ST;” “RD;” “AVE;” “BLVD;” “CIR;” and “PL”.
SetParsedSuiteName#
- Syntax:
SetParsedSuiteName(String suiteName);
- Return Type:
Void
This function sets the name of the secondary unit of an address.
- Remarks
This function accepts a four-character maximum string value containing the name portion of a secondary address.
Possible values that can be passed to this function are:
"#" "APT" "BLDG" "BOX" "BSMT" "DEPT" "FL" "FRNT" "HNGR" "LBBY" "LOT" "LOWR" "OFC" "PH"(Penthouse) "PIER" "REAR" "RM" "SIDE" "SLIP" "SPC" "STE" "STOP" "TRLR" "UNIT" "UPPR"
SetParsedSuiteRange#
- Syntax:
SetParsedSuiteRange(String suiteRange);
- Return Type:
Void
This function sets the range of any secondary unit of an address.
- Remarks
When used to pass the suite range to the VerifyAddress function, this function allows you to easily use AddressCheck if your data is already stored in parsed format.
Verify The Address#
The VerifyAddress function standardizes and verifies the submitted address information.
VerifyAddress#
- Syntax:
VerifyAddress();
- Returns:
Is Successful
- Return Type:
Boolean
This function will verify, standardize, and enhance a U.S. or Canadian address based on the input data. You must call the functions listed below with the address to be verified.
- Remarks
A TRUE return will set most or all of the functions of the AddressCheck Interface with standardized data. Check the GetResults function to determine the level of matching found for the input address.
On a FALSE return, also check the GetResults function to determine the cause of the problem.
If the value passed to the SetCASSEnable function is FALSE, this function will only verify and code U.S. addresses to the ZIP + 4 level and will not perform DPV processing. In order to generate a CASS Form 3553 and receive postal discounts, you must set SetCASSEnable to TRUE.
- Input Functions
The VerifyAddress function requires that you call some, or all, of the following functions:
- SetCompany:
Optional
- SetAddress:
Required
- SetSuite:
Optional
- SetCity:
Optional or Required (see below)
- SetState:
Optional or Required (see below)
- SetZip:
Optional or Required (see below)
- SetLastLine:
Optional or Required (see below)
- SetPlus4:
U.S. Only & Optional
- SetUrbanization:
U.S. Only & Optional
- SetCountryCode:
Optional
The city and state are optional if the ZIP Code is provided and the ZIP Code is optional if the city and state are provided. If the city, state and ZIP Code information is contained in a single field, the SetLastLine function can be used in place of the City, State and ZIP.
- Return Value
The VerifyAddress function returns a Boolean value of 0 (FALSE) if the address cannot be coded, or 1 (TRUE) if the address can be coded.
Call the GetResults function after this to determine the match level with the national database. On a fully verified address (results code “AS01”), Address Object will populate return values for most, if not all, of the functions listed below, when applicable to the submitted address.
When the input address is a non-USPS address in the U.S. (results code “AS03”), the following functions will not return a value:
GetAddressTypeCode GetAddressTypeString GetCMRA GetCarrierRoute GetELotNumber GetELotOrder GetDPVFootnotes GetEWSCount GetEWSFlag GetLACS GetLACSLinkIndicator GetLACSLinkReturnCode GetSuiteLinkReturnCode GetSuiteStatus
When verifying a Canadian address using the Canadian add-on, only the following functions will return a value, if applicable:
GetResults GetCompany GetAddress GetAddress2 GetSuite GetCity GetState GetZip GetParsedAddressRange GetParsedPreDirection GetParsedStreetName GetParsedPostDirection GetParsedSuffix GetParsedSuiteName GetParsedSuiteRange GetParsedRouteService GetParsedLockBox GetParsedDeliveryInstallation GetParsedGarbage
When using the RBDI add-on, the GetRBDI function will return a value for U.S. addresses.
Get Output Parameter#
- Syntax:
GetOutputParameter(String ParameterName);
- Returns:
Parameter
- Return Type:
String
This function allows you to get the output value for a particular address output parameter after verification has occurred.
- Format
mdAddr.GetOutputParameter(“outputParameter”)
- Example
mdAddr.GetOutputParameter(“AddressLine1”)
See Output Parameters for a list of avalaible parameters.
Output Parameters#
CMRA#
U.S. Only — This function returns a one-character string that indicates whether or not an address is actually a private mailbox at a Commercial Mail Receiving Agency (CMRA) like the UPS Store.
This table should be queried based on the return code from EnhancedDPVCode
DPH/HSA |
Y |
D |
S |
N |
Blank |
---|---|---|---|---|---|
CMRA/HSC |
Y or N |
Y, N, or Blank |
Y or N |
Blank |
Blank |
DeliveryDays#
Returns comma delimited list of days that mail is delivered (i.e. “Mon,Tue,Wed,Thu,Fri,Sat,Sun”).
DPVConfirmationCode#
Returns if address is DPV Confirmed. This table should be queried based on the return code from EnhancedDPVCode
DPH/HSA |
Y |
D |
S |
N |
Blank |
---|---|---|---|---|---|
CMRA/HSC |
Y or N |
Y, N, or Blank |
Y or N |
Blank |
Blank |
DropIndicator#
EnhancedDPVCode#
Returns the enhanced DPV return codes.
DPV |
Definition |
---|---|
Y |
Address was DPV confirmed for primary and secondary numbers necessary to determine a valid delivery point. |
D |
Address was DPV confirmed for the primary number only. Secondary information was missing. |
S |
Address was DPV confirmed for the primary number only, the secondary number information was present but not confirmed or a single trailing alpha on a primary number was dropped to make a DPV match and secondary information required. |
N |
Primary number failed to DPV confirm. |
R |
Address confirmed but assigned to phantom route R777 and R779 and USPS delivery is not provided. |
NoSecureLocation#
NoStatIndicator#
NoStatReasonCode#
Returns the no stat type (1-6).
Code |
Description |
---|---|
1 |
IDA (Internal Drop Address) – Addresses that do not receive mail directly from the USPS but are delivered to a drop address that services them. |
2 |
CDS NoStat – Addresses that have not yet become deliverable. For example, a new subdivision where lots and primary numbers have been determined, but no structure exists yet for occupancy. |
3 |
Collision – Addresses that do not actually DPV confirm. In this case, the ‘Y’ should be set to ‘N’ on the DPV ‘A’ table and all other table values should be blank. |
4 |
CMZ (College, Military and Other Types) – ZIP + 4 records USPS has incorporated into the data. |
5 |
Regular NoStat – Indicates addresses not receiving delivery and the addresses are not counted as possible deliveries. |
6 |
Secondary Required – The address requires secondary information. |
PBSA#
This table should be queried based on the return code from EnhancedDPVCode
DPH/HSA |
Y |
D |
S |
N |
Blank |
---|---|---|---|---|---|
FALSEPOS/HSF |
Y or N |
Y, N, or Blank |
Y or N |
Blank |
Blank |
ThrowBack#
Vacant#
ZipIncludedIn3553#
Retrieve Status and Return Codes#
The following functions return information about the level and types of data matches found by a call to the VerifyAddress function:
GetResults#
- Syntax:
GetResults();
- Returns:
Result Codes
- Return Type:
String
This function returns a comma-delimited string of four-character codes that detail the level of matching found for the current address, any errors that occurred during the last call to the VerifyAddress function, and any changes that were made in the process of standardizing the information.
- Remarks
The GetResults function is intended to replace the GetStatusCode, GetErrorCode, GetErrorString, GetDPVFootnotes, and GetSuiteStatus functions, providing a single source of information about the last VerifyAddress function call and eliminating the need to call multiple functions to determine if a particular address was fully coded and verified.
The function returns one or more of the result codes in a comma-delimited list. Result Codes
These results codes are designed to clearly indicate if an address is “good” or “bad.” A good address will contain AS01, a bad one will not.
If you have other conditions for a good address, you can use results codes to filter them as well. For example, if you are not using USPS and cannot deliver to a PO Box or a Military address, you can exclude records that return the results code “AS20.”
Change codes do not indicate a problem with the validity of the address, but that Address Object made minor changes to accurize and standardize the information.
Retrieve Status and Return Codes - Extra#
The following functions return additional information about the level and types of data matches found by a call to the VerifyAddress function:
GetDPVFootnotes#
- Syntax:
GetDPVFootnotes();
- Returns:
DPV Footnote Codes
- Return Type:
String
U.S. Only - This function returns the applicable standard USPS footnote codes for the input address.
- Remarks
This function will return a string value up to 6 characters long containing the applicable DPV footnote codes.
The following standard footnotes are available:
Code
Description
AA
Input address matched to the ZIP + 4 product.
A1
Input address not matched to the ZIP + 4 product.
BB
Input address matched to DPV to both primary and secondary numbers necessary to determine a valid delivery point.
CC
Input address primary number (street number) matched, secondary number not matched; secondary number not required.
C1
Input address primary number matched, secondary number not matched; secondary number required.
F1
Input address matched to a military address.
G1
Input address matched to a general delivery address.
IA
Informed address identified.
N1
Input address primary number matched to DPV but address missing required secondary number.
M1
Input address primary number missing.
M3
Input address primary number invalid.
PB
Identified PO Box Street Address.
P1
Input address PO, RR or HC box number missing.
P3
Input address PO, RR or HC box number invalid.
RR
Input address matched to CMRA but PMB designator present (PMB 123 or # 123).
R1
Input address matched to CMRA but PMB designator not present (PMB 123 or # 123).
R7
Addresses that are assigned to a phantom route of R777 or R779.
TA
Input address primary number matched by dropping trailing alpha.
U1
Input address matched to a unique ZIP Code.
GetEWSCount#
- Syntax:
GetEWSCount();
- Returns:
EWS Count
- Return Type:
Integer
U.S. Only - The return value of this function increments by one for each EWS record found by the current instance of Address Object.
- Remarks
The AddressCheck Interface keeps a count of EWS records encountered by the current instance of Address Object (for CASS reporting purposes only) and returns it via this function
GetEWSFlag#
- Syntax:
GetEWSFlag();
- Returns:
EWS Flag
- Return Type:
String
U.S. Only - This function returns a one-character string value which indicates whether the current address record was found in the Early Warning System (EWS) database.
- Remarks
The GetEWSFlag function returns a “Y” if the current address was found in the EWS database. The GetResults function will also return a “AE06.”
This function will only return a value if a TRUE value was passed to the EnableEarlyWarningSystem function.
The function will only return a value if ews.txt is in the data files folder for the cross-platform version of Address Object
GetLACS#
- Syntax:
GetLACS();
- Returns:
LACS Status
- Return Type:
String
U.S. Only - This function returns a one-character string which indicates if the input address has undergone a conversion to a city-style street address.
- Remarks
The GetLACS function returns a one-character value set by a call to the VerifyAddress function.
Some rural route addresses are modified to city-style addresses to allow emergency services (for example, ambulance, police, fire, and so on) to find these addresses more efficiently.
An empty space indicates that the address has not undergone such a conversion. A value of “L” in the LACS field indicates that the address has undergone a conversion. After a conversion, the old address is retained in the ZIP + 4 file for a period of one year. After the one year period, the old addresses will be dropped from the ZIP + 4 file and the address checking logic will not assign a ZIP + 4 for this address.
This function does not indicate that Address Object updated the address. For that information, check the GetLACSLinkIndicator function.
GetLACSLinkIndicator#
- Syntax:
GetLACSLinkIndicator();
- Returns:
Was Address Corrected
- Return Type:
String
U.S. Only - This function returns a “Y” if the submitted address was corrected to a new address found in the LACSLink data. An “S” is returned if the submitted address was corrected to a new address found in the LACSLink data but contained a suite that could not be matched. An “N” is returned if the address was not updated by LACSLink.
- Remarks
LACSLink is a process where some rural route addresses are modified to city-style addresses to allow emergency services (for example, ambulance, police, fire, and so on) to find these addresses more efficiently.
The LACSLink service matches the old address with the updated address and corrects it as part of the Address Check process.
If the submitted address was found in the LACSLink database and changed to the new address, this function will return a “Y,” otherwise it will return an “N.” An “S” if the submitted address was corrected to a new address found in the LACSLink data but contained a suite that could not be matched.
This indicator is only returned for LACS addresses (rural route addresses whether or not they have been converted).
GetLACSLinkReturnCode#
- Syntax:
GetLACSLinkReturnCode();
- Returns:
LACS Link Return Codes
- Return Type:
String
U.S. Only - This function returns a two-character number code indicating the degree to which the submitted address was matched to the LACSLink data and if the address was updated.
- Remarks
Some rural route addresses are modified to city-style addresses to allow emergency services (for example, ambulance, police, fire, and so on) to find these addresses more efficiently.
The LACSLink service matches the old address with the updated address and corrects it as part of the Address Check process.
This function returns one of the following codes:
Code |
Description |
---|---|
A |
LACS Record Match - The input record matched to a record in the master file. A new address could be furnished. |
00 |
No Match - The input record could not be matched to a record in the master file. A new address could not be furnished. |
14 |
Found LACS Record: New Address Would Not Convert at Run Time - The input record matched to a record in the master file. The new address could not be converted to a deliverable address. |
92 |
LACS Record: Secondary Number Dropped from Input Address - The input record matched to a master file record, but the input address had a secondary number and the master file record did not. The record is a ZIP + 4 street level or high-rise match. |
This return code is only returned for LACS addresses (rural route addresses whether or not they have been converted).
GetRBDI#
- Syntax:
GetRBDI();
- Returns:
RBDI
- Return Type:
String
For information about purchasing the RBDI add-on for Address Object, call 1-800-MELISSA.
U.S. Only - This function returns a one-character code indicating whether the submitted address is a residence, a business, or the status is unknown.
- Requires
RBDI add-on for Address Object.
- Remarks
Parcel delivery to residential addresses is more expensive than to business addresses. You can use the return value of this function to filter out one type of address or the other, or determine the best carrier for the delivery.
If the RBDI add-on is installed, this function will return one of the following codes:
Code
Definition
R
Residential Address
B
Business Address
U
Unknown
GetSuiteLinkReturnCode#
- Syntax:
GetSuiteLinkReturnCode();
- Returns:
Suite Link Return Code
- Return Type:
String
U.S. Only - This function returns a string value indicating whether a match was found for the submitted address record in the SuiteLink data file.
- Remarks
SuiteLink is a product offered by the U.S. Postal Service which enables Address Object to link a business address to a suite number and update your address records that are missing suite information.
The SuiteLink Return Code indicates whether or not the submitted address was matched to the database and an improved suite number could be returned.
Code
Definition
A
The input record matched to a record in the master file. An improved business address could be furnished.
00
The input record could not be matched to a record in the master file. An improved business address could not be furnished.
If this function returns a string value of “A,” an improved suite number will be returned by the GetSuite function.
Retrieve the Standardized and Verified Address Data#
The following functions retrieve the address information that has been verified and standardized by a call to the VerifyAddress function:
GetAddress#
- Syntax:
GetAddress();
- Returns:
Address
- Return Type:
String
This function returns the standardized delivery address associated with the input address.
- Remarks
After a call to the VerifyAddress function, the GetAddress function will return the address passed to the SetAddress function, including any corrections or standardizations performed by the address checking logic.
Address corrections may include fixing misspelled street names or inserting missing suffixes and directionals.
Address standardization involves the conversion of suffixes and directionals to preferred postal abbreviations (for example, “Street” to “St”).
If a suite name is attached to the end of the parameter passed to SetAddress, it will be returned by GetSuite function. If the address is a private mailbox, the PMB will be returned by the GetPrivateMailbox function.
To return the full address in one line, combine the return values of the GetAddress, GetSuite, and GetPrivateMailbox functions into a single string value.
GetAddress2#
- Syntax:
GetAddress2();
- Returns:
Address
- Return Type:
String
This function returns the second address line associated with the input address.
- Remarks
This function normally returns the unverified string value passed to the SetAddress2 function. However, if the value passed to the SetAddress is not verifiable and the value passed to SetAddress2 contains a verifiable address, this function will return the unverified value originally passed to SetAddress.
GetCity#
- Syntax:
GetCity();
- Returns:
City
- Return Type:
String
After a successful call to the VerifyAddress function, this function returns a string value containing the name of the city or municipality associated with the verified address.
- Remarks
If the city name was not supplied before calling VerifyAddress, the address checking logic will return the official city or municipality name of the ZIP or Postal Code instead.
If the SetCity function was called, the address checking logic will only change the city or municipality name if it is an incorrect or unapproved mailing name. In these cases, the official city or municipality name for the ZIP or Postal Code will be returned. However, if the official city or municipality name or an approved vanity name for the ZIP or Postal Code is entered, the address checking logic will return that city as entered.
If the supplied city and state do not match the ZIP or Postal Code, the address checking logic will give preference to the city name. Matches will be attempted within the supplied city instead of the ZIP or Postal Code. This logic is based on the assumption that a ZIP or Postal Code with one typo will result in more incorrect address matches than a city name with a few typos.
GetCompany#
- Syntax:
GetCompany();
- Returns:
Company
- Return Type:
String
This function returns the name of the company associated with the input address.
- Remarks
The VerifyAddress function will not change the company name supplied by the user.
GetCountryCode#
- Syntax:
GetCountryCode();
- Returns:
Country Code
- Return Type:
String
This function returns a two-character abbreviation that indicates the country associated with the input address.
- Remarks
This function returns a string value after a successful call to the VerifyAddress function.
Address Object includes data for American and Canadian addresses. “US” is returned for addresses in the United States and “CA” is returned for Canadian addresses.
GetPlus4#
- Syntax:
GetPlus4();
- Returns:
Zip Plus4
- Return Type:
String
U.S. Only - This function returns the four-digit ZIP Code add-on associated with the input address.
- Remarks
If the user does not pass a value to the SetPlus4 function, the address checking logic will only code the address with a ZIP + 4 if the address can be fully DPV verified or the SetCASSEnable function is set to FALSE and the address can be ZIP + 4 verified.
This function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address)
GetState#
- Syntax:
GetState();
- Returns:
State
- Return Type:
String
This function returns the two-letter state or province abbreviation associated with the standardized address.
- Remarks
If the value passed to the SetState function is incorrect or is not supplied, the address checking logic will return the correct two-letter state abbreviation to this function if the submitted ZIP or Postal Code is valid.
GetSuite#
- Syntax:
GetSuite();
- Returns:
Suite
- Return Type:
String
This function returns the suite name and number associated with the input address.
- Remarks
If the suite number is part of the value passed to the SetAddress function, it will be returned via the GetSuite function. This move helps maintain a clean database and allows the user to limit secondary ranges to a separate field.
If you want the address and suite combined, you will need to join the return values of these two functions together. Make sure to add a space between the values when you join them.
GetUrbanization#
- Syntax:
GetUrbanization();
- Returns:
Urbanization Name
- Return Type:
String
Puerto Rican Addresses Only - This function returns the urbanization name associated with the input address. This function applies to Puerto Rican addresses only.
- Remarks
See the details on the SetUrbanization function to learn how the urbanization is used with Puerto Rican addresses.
GetZip#
- Syntax:
GetZip();
- Returns:
Zip
- Return Type:
String
This function returns the five-digit or nine-digit U.S. ZIP Code or the six-character Canadian Postal Code associated with the input address. It is always populated by a successful call to the VerifyAddress function.
- Remarks
If the ZIP Code is incorrect or not supplied, the address checking logic will return the correct five-digit ZIP Code or six-character Postal Code to this function as long as the correct city/municipality and state/province were supplied for the input address.
Retrieve Parsed Street Address#
In addition to verifying and standardizing an address, the AddressCheck Interface will also parse the street address and return the parts via the following functions:
GetParsedAddressRange#
- Syntax:
GetParsedAddressRange();
- Returns:
Address Range
- Return Type:
String
This function returns the delivery number of a street address.
- Remarks
This function returns the range portion of a street address after a successful call to the VerifyAddress function.
GetParsedDeliveryInstallation#
- Syntax:
GetParsedDeliveryInstallation();
- Returns:
Delivery Installation information
- Return Type:
String
Canada Only — This function returns the Delivery Installation information from a parsed Canadian street address.
- Remarks
The delivery installation is the post office facility responsible for delivering to the current address. It is often used for rural addresses or when multiple post offices service the same municipality.
GetParsedGarbage#
- Syntax:
GetParsedGarbage();
- Returns:
Garage
- Return Type:
String
This function returns any unused characters left over from the street address after it has been submitted.
- Remarks
This function may return up to a 50-character string value containing any garbage characters left from the street address after a successful call to the VerifyAddress function.
The return value may contain any characters or tokens that were not used by the VerifyAddress function to validate the address. Common items found returned by this function are community center names, names of individuals, additional delivery instructions, and so on.
Some examples would be “West Wing” or “Beaumont Main Office.”
GetParsedLockBox#
- Syntax:
GetParsedLockBox();
- Returns:
Lock Box
- Return Type:
String
Canada Only — This function returns the Lock Box information from a parsed Canadian street address.
- Remarks
A lock box is the Canadian equivalent of a Post Office Box in the U.S. (The two terms are often used interchangeably in Canada).
GetParsedPostDirection#
- Syntax:
GetParsedPostDirection();
- Returns:
Post Direction
- Return Type:
String
This function returns any geographic directional that follows the street name of a submitted street address.
- Remarks
This function will return the post-directional part of a street address after a successful call to the VerifyAddress function.
The return value of this function will contain the post-directional part of the full address string passed into the SetAddress or SetAddress2 function. The format will depend on the setting of the SetStandardizationType function. “ShortFormat” will abbreviate the directional, “LongFormat” will spell it out, and “AutoFormat” will preserve the original style.
GetParsedPreDirection#
- Syntax:
GetParsedPreDirection();
- Returns:
Pre Direction
- Return Type:
String
This function returns the geographic directional that precedes the street name of a submitted street address.
- Remarks
This function returns the pre-directional part of a street address after a successful call to the VerifyAddress function. The return value of this function will contain the post-direction of the full address string passed into the SetAddress or SetAddress2 function. The format will depend on the setting of the SetStandardizationType function. “ShortFormat” will abbreviate the directional, “LongFormat” will spell it out, and “AutoFormat” will preserve the original style.
GetParsedPrivateMailboxName#
- Syntax:
GetParsedPrivateMailboxName();
- Returns:
Private Mailbox Name
- Return Type:
String
This function returns the name of the private mail box associated with a CMRA (Commercial Mail Receiving Agency).
- Remarks
This function returns a three-character maximum string value containing the private mail box name of the full address string after a successful call to the VerifyAddress function.
The possible return values for this function are “PMB” and “#.”
GetParsedPrivateMailboxNumber#
- Syntax:
GetParsedPrivateMailboxNumber();
- Returns:
Private Mailbox Number
- Return Type:
String
This function returns the number of the private mail box associated with a CMRA (Commercial Mail Receiving Agency).
- Remarks
This function returns a 10-character maximum string value containing the private mail box number portion of a street address after a successful call to the VerifyAddress function.
GetParsedRouteService#
- Syntax:
GetParsedRouteService();
- Returns:
Route Service
- Return Type:
String
Canada Only — This function returns the route service information from a parsed Canadian street address.
- Remarks
Route service is a term used to refer to what the USPS would call a Rural Route address.
GetParsedStreetName#
- Syntax:
GetParsedStreetName();
- Returns:
Street Name
- Return Type:
String
This function returns the street name portion of an address.
- Remarks
This function returns the street name of the full address string passed via the SetAddress or SetAddress2 functions.
For street names that begin with one of the following Spanish words, that first word will be moved to the suffix field and the next word in the street name will be returned as the street name. This is because Spanish street names have the suffix at the front of the address. If the suffix was not moved to the suffix field, it would appear that every street in some Puerto Rican ZIP codes began with the same name. The Spanish words that get moved to the suffix field are: “Avenida,” “Calle,” “Camino,” “Paseo,” and “Via”
GetParsedSuffix#
- Syntax:
GetParsedSuffix();
- Returns:
Suffix
- Return Type:
String
This function returns the street suffix portion of a street address.
- Remarks
This function returns the suffix of the full street address passed via the SetAddress or SetAddress2 functions.
The output of this function depends on the setting passed to the SetStandardizationType function.
If the setting is “ShortFormat,” full words are abbreviated. For instance, if the suffix “Street” is found in the input string, it will be converted to “St” before being returned by this function. If the setting is “LongFormat,” the long form of the suffix (“Street”) will be returned, even if abbreviated in the input door. If the setting is “AutoFormat,” the original form of the suffix in the input street will be preserved.
GetParsedSuiteName#
- Syntax:
GetParsedSuiteName();
- Returns:
Suite Name
- Return Type:
String
This function returns the name of the secondary unit of an address.
- Remarks
This function returns a string value containing the suite name portion of a street address after a successful call to the VerifyAddress function. Possible return values are:
"#" "APT" "BLDG" "BOX" "BSMT" "DEPT" "FL" "FRNT" "HNGR" "LBBY" "LOT" "LOWR" "OFC" "PH"(Penthouse) "PIER" "REAR" "RM" "SIDE" "SLIP" "SPC" "STE" "STOP" "TRLR" "UNIT" "UPPR"
GetParsedSuiteRange#
- Syntax:
GetParsedSuiteRange();
- Returns:
Suite Range
- Return Type:
String
This function returns the range of any secondary unit of an address.
- Remarks
This function returns the suite number portion of a full address string passed via the SetAddress or SetAddress2 functions after a successful call to the VerifyAddress function.
Retrieve Demographic and Other Information#
The following functions return additional information linked to the submitted address:
GetAddressTypeCode#
- Syntax:
GetAddressTypeCode();
- Returns:
Address Type Code
- Return Type:
String
This function returns the type of address that was coded (PO Box, Rural Route, and so on), using the input address.
- Remarks
The GetAddressTypeCode function returns a one-character value set by a call to the VerifyAddress function.
For U.S. addresses, Address Object would return one of the following codes:
Code
String
A
Alias
F
Firm or Company address
G
General Delivery address
H
High Rise or Business complex
P
PO Box address
R
Rural Route address
S
Street or Residential address
For Canadian addresses, Address Object would return one of the following codes:
Code
String
1
Street
2
Street Served By Route and GD
3
Lock Box
4
Route Service
5
General Delivery
B
LVR Street
C
Government Street
D
LVR Lock Box
E
Government Lock Box
L
LVR General Delivery
K
Building
If the VerifyAddress function has not been called, or if the VerifyAddress function call resulted in an error, this function returns an empty value.
This function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address).
GetAddressTypeString#
- Syntax:
GetAddressTypeString();
- Returns:
Address Type Description
- Return Type:
String
This function returns a string value that describes the code returned by the GetAddressTypeCode function.
- Remarks
The GetAddressTypeString function returns a string value after a successful call to the VerifyAddress function.
For a list of the strings returned by this function, see the section above for the GetAddressTypeCode function.
If the VerifyAddress function has not been called, or if the VerifyAddress function call resulted in an error, this function will return an empty value.
This function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address).
GetCityAbbreviation#
- Syntax:
GetCityAbbreviation();
- Returns:
City Abbreviation
- Return Type:
String
This function returns the official 13-letter city name abbreviation associated with the input address.
- Remarks
If the value returned by the GetCity function is longer than 13 letters, the GetCityAbbreviation function will return the official abbreviation the Post Office has associated with that city or municipality name. For example, the GetCityAbbreviation function will return the abbreviation “Rcho Sta Marg” for “Rancho Santa Margarita.”
If the value returned by the GetCity function is 13 letters or shorter, the GetCityAbbreviation function will return the full city or municipality name.
GetCMRA#
- Syntax:
GetCMRA();
- Returns:
Is CMRA
- Return Type:
String
U.S. Only — This function returns a one-character string that indicates whether or not an address is actually a private mailbox at a Commercial Mail Receiving Agency (CMRA) like the UPS Store. Returned by a successful call to the VerifyAddress function.
- Remarks
This function returns a one-character value after a successful call to the VerifyAddress function:
Code
Description
N
The address does not belong to a CMRA.
Y
The address belongs to a CMRA.
Empty
This field is not populated when the GetDPVFootnotes function returns an “F1,” “G1,” or “U1” code.
This function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address).
GetCongressionalDistrict#
- Syntax:
GetPrivateMailbox();
- Returns:
Congressional District
- Return Type:
String
U.S. Only — This function returns the congressional district number associated with the input address.
- Remarks
The GetCongressionalDistrict function returns a four-character string value after a call to the VerifyAddress function. This number is the congressional district for the address given and is accurate to the ZIP + 4 level.
If the VerifyAddress function has not been called, or if the VerifyAddress function call resulted in an error, this function will return an empty value.
This function returns the standard abbreviation of the state name plus the two-digit number representing the congressional district number. For example, an address in the first district in California would return “CA01.”
For states with only one congressional representative, the value “01” is returned. To find the representative associated with this district, use the Congress.csv file located on the DVD-ROM in the \data directory. The district number and state abbreviation will be needed to locate this person.
GetCountyFips#
- Syntax:
GetCountyFips();
- Returns:
County FIPS Code
- Return Type:
String
U.S. Only — This function returns the five-digit county FIPS code associated with the input address.
- Remarks
The GetCountyFips function returns a five-character value string after a successful call to the VerifyAddress function.
The Federal Information Processing Standard (FIPS) is a five-digit code defined by the U.S. Bureau of Census. The first two digits are the state code and the last three indicate the county within the state.
For Example: “06037” is the County FIPS for Los Angeles, CA (“06” is the state code for California and “037” is the county code for Los Angeles).
The value returned by the GetCountyFips function is accurate to the nine-digit ZIP + 4 level.
GetCountyName#
- Syntax:
GetCountyName();
- Returns:
County Name
- Return Type:
String
This function returns the name of the county associated with the input address.
- Remarks
The GetCountyName function returns a 25-character string value up to 25 characters after a successful call to the VerifyAddress function.
The county name is associated with the County FIPS code and it is accurate to the nine-digit ZIP + 4 level.
GetPrivateMailbox#
- Syntax:
GetPrivateMailbox();
- Returns:
Private Mailbox Number
- Return Type:
String
U.S. Only — This function returns the private mail box number associated with a CMRA (Commercial Mail Receiving Agency).
- Remarks
This function returns a string value after a successful call to the VerifyAddress function.
CMRAs are private businesses that provide a mailing address and “post office” box for their customers.
Mail is delivered by the Postal Service to the CMRA, which then distributes the mail to the customer’s private mail box.
GetTimeZone#
- Syntax:
GetTimeZone();
- Returns:
Time Zone
- Return Type:
String
This function returns a string value describing the time zone of the input address.
- Remarks
All Melissa Data products express time zones in UTC (Coordinated Universal Time).
The GetTimeZone function returns a string value describing the time zone of the ZIP where the address is located. If an address cannot be verified, this string will be empty.
These are the strings that can be returned:
"Military" "Mountain Time" "Marshall Islands Time" "Newfoundland Time" "Pacific Time" "Guam Time" "Atlantic Time" "Alaska Time" "Palau Time" "Eastern Time" "Hawaii Time" "Central Time" "Samoa Time"
The GetTimeZone function does not account for daylight savings time regardless of whether it affects an area or not.
GetTimeZoneCode#
- Syntax:
GetTimeZoneCode();
- Returns:
Time Zone Code
- Return Type:
String
This function returns a one or two-digit code representing the time zone associated with the input address.
- Remarks
The GetTimeZoneCode function returns a one or two-digit number representing the time zone for the address returned by a call to the VerifyAddress function. If an address cannot be verified, this string will be empty.
These are the possible values returned by the GetTimeZoneCode function:
Code
Zone
0
Military (APO or FPO)
3A
Newfoundland Time (1/2 Hour Change)
4
Atlantic Time
5
Eastern Time
6
Central Time
7
Mountain Time
8
Pacific Time
9
Alaska Time
10
Hawaii Time
11
Samoa Time
12
Marshall Islands Time
14
Guam Time
15
Palau Time
The GetTimeZoneCode function does not account for daylight savings time.
GetZipType#
- Syntax:
GetZipType();
- Returns:
Zip Type
- Return Type:
String
U.S. Only — This function returns a string value representing the ZIP Code type associated with the submitted address.
- Remarks
This function returns a one-character string set by a successful call to the VerifyAddress function.
The value returned by GetZipType defines the type of ZIP Code for delivery purposes.
Code
Explanation
P
A ZIP Code used only for PO Boxes.
U
Unique: A ZIP Code assigned to an organization or government institution such as the IRS.
M
Military: A ZIP Code assigned to an APO/FPO.
Empty
A standard ZIP Code.
Retrieve Information for Mailing and Sorting#
The following functions return information used for presorting lists and printing address labels:
GetAddressKey#
- Syntax:
GetAddressKey();
- Returns:
Address Key
- Return Type:
String
This function return a unique 11-digit address key for the submitted address.
- Remarks
The return value of the GetAddressKey function is a string value that provides a unique identifier for a given address. This key will be required to use some Melissa Data products with non-USPS addresses.
GetCarrierRoute#
- Syntax:
GetCarrierRoute();
- Returns:
Carrier Route
- Return Type:
String
U.S. Only — This function returns the carrier route associated with the input address.
- Remarks
This function returns a four-character string value after a successful call to the VerifyAddress function.
The first character of this Carrier Route is always alphabetic and the last three characters are numeric. For example, “R001” or “C027” would be typical carrier routes. The alphabetic letter indicates the type of delivery associated with this address.
B = PO BoxC = City DeliveryG = General DeliveryH = Highway ContractR = Rural RouteThis function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address).
GetDeliveryPointCheckDigit#
- Syntax:
GetDeliveryPointCheckDigit();
- Returns:
Delivery Point Check Digit
- Return Type:
String
U.S. Only — This function returns the one-digit number representing the check digit associated with the input address.
- Remarks
This function returns a one-digit string set after a successful return from the VerifyAddress function. This one-digit string makes up the 12th position of a 12-digit POSTNET barcode.
In 12-digit POSTNET barcodes, the ZIP Code is used for positions 1 to 5, the Plus4 code for positions 6 to 9, the delivery point code for positions 10 and 11, and this check digit for position 12.
GetDeliveryPointCode#
- Syntax:
GetDeliveryPointCode();
- Returns:
Delivery Point Code
- Return Type:
String
U.S. Only — This function returns the two-digit delivery point code associated with the input address.
- Remarks
This function returns a two-digit character string set after a successful return from the VerifyAddress function. This two-digit string makes up the 10th and 11th positions of a 12-digit POSTNET barcode.
See the explanation for the GetDeliveryPointCheckDigit function for a complete guide to producing POSTNET barcodes.
GetELotNumber#
- Syntax:
GetELotNumber();
- Returns:
Line-of-Travel Number
- Return Type:
String
U.S. Only — This function returns a string containing the Line-of-Travel number for the submitted address.
- Remarks
The Line-of-Travel number designates approximately where the submitted address falls within the ZIP + 4.
This number may be required during presorting Standard Mail when using LOT or Carrier Route sortations.
If the eLOT data file is not present in the path specified with the SetPathToDPVDataFiles function, this function will return a value of “-1.”
This function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address).
GetELotOrder#
- Syntax:
GetELotOrder();
- Returns:
Line-of-Travel Direction Indicator
- Return Type:
String
U.S. Only — This function returns a string containing the Line-of-Travel direction indicator for the submitted address.
- Remarks
The Line-of-Travel Order designates whether the Post Office delivers mail in the current ZIP + 4 in ascending or descending order according to the LOT Number.
This function returns an “A” for “ascending” or “D” for “descending.”
This function may be required during presorting Standard Mail when using LOT or Carrier Route sortations.
If the eLOT data file is not present in the path specified with the SetPathToDPVDataFiles function, this function will return a value of “X.”
This function does not return any data when the GetResults function returns the results code “AS03” (Non-USPS address).
GetMelissaAddressKey#
- Syntax:
GetMelissaAddressKey();
- Returns:
MAK
- Return Type:
String
This function returns the Melissa Address Key (MAK), a proprietary unique key identifier for an address.
- Remarks
This is a globally unique and persistent key for the location, even if parts of the address change. When an address is fully validated this field returns a 10-digit proprietary key for the address.
With AddressKey (US and Canada only), if an address ZIP Code™ changes, the AddressKey would also change. Melissa Address Key (MAK) is independent and will not change. This makes MAK a good way to permanently identify and locate addresses. Once you have a MAK it can be used as an input in most Melissa services and thus is a good tool for deduping.
GetMelissaAddressKeyBase#
- Syntax:
GetMelissaAddressKeyBase();
- Returns:
BaseMAK
- Return Type:
String
This function returns the Melissa Address Key Base (BASEMAK), a proprietary unique key identifier for sub-premise addresses.
- Remarks
Every full address has its own Melissa Address Key (MAK). If that address is a suites or apartment, we will also return a Melissa Address Key Base (BaseMAK) that corresponds to the overall building. This provides a link between all the individual MAK addresses that belong to the same building. This field also returns a 10-digit proprietary key. Note, if we can validate the address to the building but not the suite, we can return just the BaseMAK.
Suggestions#
The following functions return possible correct addresses if the VerifyAddress function was unable to verify or correct the submitted address:
FindSuggestion#
- Syntax:
FindSuggestion();
- Returns:
Is Suggestion Found
- Return Type:
Boolean
This function returns the first suggestion based on the original submitted address.
Remarks This function can be called after the VerifyAddress function, if the originally submitted address could not be verified by Address Object.
FindSuggestion will only work if the SetCASSEnable function is set to false. You cannot combine suggestions with CASS verification. You must also have DPV enabled, meaning that a valid directory path to the DPV data files must be set using the SetPathToDPVDataFiles function.
This function returns an integer value. If the return value is 1, then a suggestion was found and this address was used to populate the same return values as the VerifyAddress function. Use the same functions as you would have with VerifyAddress.
A return value of 0 indicates that no suggestion was found.
FindSuggestionNext#
- Syntax:
FindSuggestionNext();
- Returns:
Is Next Suggestion Found
- Return Type:
Boolean
This function returns the next suggestion, if any, based on the originally submitted address.
- Remarks
The FindSuggestionNext function can be called after a successful call to the FindSuggestion function and can be repeated until the function returns an integer value of 0, indicating that no further suggestions are available.
If this function returns an integer value of 1, then the suggested address was used to populate the return values of the same functions as the FindSuggestion function.
Retrieve CASS Form 3553#
U.S. Only — The following functions retrieve CASS Form 3553 and return the information used to populate the form. Address Object only generates a CASS Form 3553 for U.S. addresses. This information is already included on the generated CASS Form, so it is returned here only for information purposes:
GetFormPS3553#
- Syntax:
GetFormPS3553();
- Returns:
Form PS3553
- Return Type:
String
This function returns the CASS Form 3553 as a string value in HTML format which can be saved to a file, opened in a Web browser, or put into a Web browser control for viewing and printing. To save the CASS Form directly to an HTML file, use the SaveFormPS3553 function.
- Remarks
CASS (USPS Certification Process for ZIP + 4 Matching Software) improves the accuracy of address matching by providing a common system to measure the quality of address matching software.
CASS Form 3553 verifies to the Post Office that your data has been coded using CASS Certified software, which is a requirement for claiming many discounted postage rates. Form 3553 must accompany a mailing to the Post Office to receive these discounts.
If the value passed to the SetCASSEnable function is FALSE, this function will generate an HTML containing the following message: The CASS 3553 form is currently not available. You must process your mailing with the SetCASSEnable flag set to “true.”
SaveFormPS3553#
- Syntax:
SaveFormPS3553(String PathAndFileName);
- Returns:
Successfully Saved
- Return Type:
Boolean
Saves the CASS Form 3553 as an HTML or PDF file that can be opened in a Web browser or a Web browser control for viewing and printing.
- Input Parameters
The SaveFormPS3553 function has one parameter:
- PathAndFileName:
The filename, including the path, to which you want to save the CASS Form. You must include the .HTML or .PDF extension in the filename.
- Return Value
The SaveFormPS3553 function returns a Boolean value of 0 (FALSE) if the file cannot be saved, or 1 (TRUE) if the file is saved.
If the value passed to the SetCASSEnable function is FALSE, this function will generate HTML containing the following message:
“The CASS 3553 form is currently not available. You must process your mailing with the SetCASSEnable flag set to ‘true.’”
ResetFormPS3553#
- Syntax:
ResetFormPS3553();
- Return Type:
Void
Resets all the internal counters to 0 in case you need to produce several CASS forms in sequence for multiple jobs. If you want relevant results on your CASS forms, avoid removing the Address Object from memory as this will clear all the counters.
GetPS3553_B6_TotalRecords#
- Syntax:
GetPS3553_B6_TotalRecords();
- Returns:
Total Records Verified
- Return Type:
Integer
This function returns an integer containing the total number of address records verified since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to generate item B6 on CASS Form 3553.
GetPS3553_C1a_4Coded#
- Syntax:
GetPS3553_C1a_4Coded();
- Returns:
Total Records ZIP4
- Return Type:
Integer
This function returns an integer containing the number of address records which were matched to the ZIP + 4 level since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate item C1a on CASS Form 3553.
GetPS3553_C1d_FiveDigitCoded#
- Syntax:
GetPS3553_C1d_FiveDigitCoded();
- Returns:
Total Records Five Digit Coded
- Return Type:
Integer
This function returns an integer containing the number of address records which were verified to the five-digit carrier route level since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate item C1d on CASS Form 3553.
GetPS3553_C1e_CRRTCoded#
- Syntax:
GetPS3553_C1e_CRRTCoded();
- Returns:
Total Records Carrier Route Coded
- Return Type:
Integer
This function returns the number of address records which were verified to the carrier route level since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate item C1e on CASS Form 3553.
GetPS3553_C1f_eLOTAssigned#
- Syntax:
GetPS3553_C1f_eLOTAssigned();
- Returns:
Total Records Assigned Enhanced LOT Number
- Return Type:
Integer
This function returns an integer the number of address records which were assigned an enhanced Line of Travel sequence number since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate item C1f on CASS Form 3553.
GetPS3553_E_EWSCount#
- Syntax:
GetPS3553_E_EWSCount();
- Returns:
Total Records Assigned Enhanced LOT Number
- Return Type:
Integer
This function returns an integer containing the number of address records that did not appear in the current U. S. Postal Service ZIP + 4 file but were valid addresses since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate section E on CASS Form 3553.
GetPS3553_E_HighRiseDefault#
- Syntax:
GetPS3553_E_HighRiseDefault();
- Returns:
Total Records High-Rise Default Matched
- Return Type:
Integer
This function returns an integer containing the number of high-rise address records that were default matched since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Default matching occurs when the address is successfully matched at the street address level but cannot be matched to a valid secondary address.
Used to populate section E on CASS Form 3553.
GetPS3553_E_HighRiseExact#
- Syntax:
GetPS3553_E_HighRiseExact();
- Returns:
Total Records High-Rise Exact Matched
- Return Type:
Integer
This function returns an integer containing the number of high-rise address records that were exactly matched to both a primary and secondary address since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate section E on CASS Form 3553.
GetPS3553_E_LACSCount#
- Syntax:
GetPS3553_E_LACSCount();
- Returns:
Total Records LACS
- Return Type:
Integer
This function returns an integer containing the number of address records that were flagged as having undergone a conversion from rural to city-style addresses since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate section E on CASS Form 3553.
GetPS3553_E_RuralRouteDefault#
- Syntax:
GetPS3553_E_RuralRouteDefault();
- Returns:
Total Rural Route Records Default Matched
- Return Type:
Integer
This function returns an integer containing the number of rural route address records which were default matched since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Default matches are verified at the route number level but not matched to a valid primary range.
Used to populate section E on CASS Form 3553.
GetPS3553_E_RuralRouteExact#
- Syntax:
GetPS3553_E_RuralRouteExact();
- Returns:
Total Rural Route Records Exact Matched
- Return Type:
Integer
This function returns an integer containing the number of rural route address records that were verified at the route number level and also matched to a valid primary range since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate section E on CASS Form 3553.
GetPS3553_X_SuiteLinkCodeACount#
- Syntax:
GetPS3553_X_SuiteLinkCodeACount();
- Returns:
Total Records With Suite Link
- Return Type:
Integer
This function returns an integer containing the number of address records with appended suite information tied to the company name (Suite Link) since the creation of the current instance of Address Object or the most recent call to the ResetFormPS3553 function.
- Remarks
Used to populate section E on CASS Form 3553.
Retrieve Summary of Addresses#
Canada Only — The following functions retrieve the Canada Post Summary of Addresses (SOA) and return data used to populate the form. These functions only apply when using the Canadian add-on for verifying Canadian addresses:
GetFormSOA#
- Syntax:
GetFormSOA();
- Returns:
Summary of Addresses Form
- Return Type:
String
This function retrieves a string value containing the current Summary of Addresses in HTML format.
- Remarks
This function retrieves the contents of the current Summary of Addresses (SOA) for all records processed since Address Object was initialized or the last time the ResetFormSOA function was called. The SetPathToCanadaFiles function must be set before processing Canadian addresses. You must also call the SetSOACustomerInfo and SetSOACPCNumber functions before calling this function.
The SOA is good for one year after it is generated. You do not need to generate another form unless your address data changes.
The SOA shows the following information:
- Customer Name
Company name as it appears on your Canada Post contract. This is entered using the SetSOACustomerInfo function.
- Customer Address
Your mailing address as it appears on your Canada Post contract.This is entered using the SetSOACustomerInfo function.
- Total Records
Total number of Canadian address records processed. This value is also returned by the GetSOATotalRecords function.
- Address Accuracy
Percentage of Accurate Canadian address records, calculated to one decimal place. This must be 95% or postage discounts will be adjusted. This value is also returned by the GetSOAAAPercentage function.
- SOA Expiry Date
The Expiry Date for the current SOA. This date will be one year after the SOA is generated. This value is also returned by the GetSOAAAExpiryDate function.
- Software Information
The company that produced the software used to generate the SOA (Melissa Data Corp.) plus the version number of the software used (the Build Number as returned by the GetBuildNumber function).
- CPC Database Date
The date of the CPC database used to verify the accuracy of the database. This is the same date returned by the GetCanadianDatabaseDate function.
- Return Value
This function returns a string value containing the HTML code for displaying the SOA in a Web browser.
SaveFormSOA#
- Syntax:
SaveFormSOA(String PathAndFileName);
- Return Type:
Void
This function saves an HTML file containing the current Summary of Addresses.
- Remarks
This function retrieves and stores the contents of the current Summary of Addresses (SOA) for all records processed since Address Object was initialized or the last time the ResetFormSOA function was called. The SetPathToCanadaFiles function must be called before processing Canadian addresses. You must also call the SetSOACustomerInfo and SetSOACPCNumber functions before calling this function.
The SOA is good for one year after it is generated. You do not need to generate another form unless your address data changes.
For a detailed explanation of the SOA report, see GetFormSOA.
- Input Parameters
The SaveFormSOA function has one parameter:
- PathAndFileName:
The filename, including the path, to which you want to save the SOA. You must include the .HTML extension in the filename.
ResetFormSOA#
- Syntax:
ResetFormSOA();
- Return Type:
Void
Resets the total records and Address Accuracy percentage for Canadian address data.
- Remarks
Use this function to reset Address Object’s running totals for Canadian addresses. This function must be called if you want to process multiple databases with the same instance of Address Object.
It is good practice to always call this function before processing Canadian address.
GetSOAAAExpiryDate#
- Syntax:
GetSOAAAExpiryDate();
- Returns:
SOAAA Expiry Date
- Return Type:
String
This function returns a string value containing the expiry date of the current Summary of Addresses.
- Remarks
This number also appears on the Summary of Addresses.
GetSOAAAPercentage#
- Syntax:
GetSOAAAPercentage();
- Returns:
Percentage of Accurate Canadian Records
- Return Type:
String
This function returns a single-precision value containing the percentage of accurate Canadian records processed since the ResetFormSOA function was called or the current instance of Address Object was created.
- Remarks
This number also appears on the Summary of Addresses. The Address Accuracy must be at least 95% to avoid adjustments to the postage discounts.
GetSOAErrorString#
- Syntax:
GetSOAErrorString();
- Returns:
SOA Error String
- Return Type:
String
This function returns a string value containing error information generated by a call to any Summary of Addresses functions.
- Remarks
This function will usually only return a value if an SOA function is called without first passing a valid path to the SetPathToCanadaFiles function.
GetSOASoftwareInfo#
- Syntax:
GetSOASoftwareInfo();
- Returns:
SOA Software Info
- Return Type:
String
This function returns a string value containing the software information that appears on the current Summary of Addresses.
- Remarks
This information also appears on the Summary of Addresses. It contains the creator of the software being used (Melissa Data Corp.) and the version number (build number).
GetSOATotalRecords#
- Syntax:
GetSOATotalRecords();
- Returns:
SOA Total Records
- Return Type:
String
This function returns a long integer value containing the total number of Canadian Records processed since the ResetFormSOA function was called or the current instance of Address Object was created.
- Remarks
This number also appears on the Summary of Addresses.
StreetData Interface#
Initialize the StreetData Interface - Set#
Initializing the StreetData Interface is slightly different than the procedure for the AddressCheck Interface.
Initialize#
- Syntax:
Initialize(String DataPath, String NationalPath, String RegionalPath);
- Returns:
Initialization Status
- Return Type:
ProgramStatus
Opens the required data file and prepares the address checking logic for use. If the data file is in the same directory as the Component, you do not need to call the Initialize function. However, if there is an error, an exception will be reported instead of an error code.
- Remarks
If the Initialize function returns a code other than zero, you can call the GetInitializeErrorString function to display a string describing the error.
- Input Parameters
The Initialize function has three string values as parameters. In VB and languages that support optional parameters, all three are considered optional. If the path is not provided, the Initialize function will look for the data files in the same directory as the Address Object component file.
- DataPath:
A string value containing the path to the location of the mdAddr.dat file.
- NationalPath:
A string value containing the path to the location of the mdAddr.nat file.
- RegionalPath:
This parameter is deprecated and no longer used. It is included for backwards compatibility. If your programming language supports optional parameters, you can ignore RegionalPath completely. If your programming language does not allow optional parameters, you must pass something to this parameter, even if it is only an empty string value.
- Return Value
The Initialize function returns one of the following:
Code
Description
0
No error - initialization was successful.
1
Could not open the mdAddr.dat file.
2
Could not open the mdAddr.nat or mdAddr.str file.
4
The internal database date of the mdAddr.dat and mdAddr.nat files do not match.
5
Not all the memory buffers could be initialized.
6
Unknown error.
SetLicenseString#
- Syntax:
SetLicenseString(String License);
- Returns:
Is License Correct
- Return Type:
Boolean
This StreetData method is the same as SetLicenseString.
Initialize the StreetData Interface - Get#
GetBuildNumber#
- Syntax:
GetBuildNumber();
- Returns:
Build Number
- Return Type:
String
This StreetData method is the same as GetBuildNumber.
GetDatabaseDate#
- Syntax:
GetDatabaseDate();
- Returns:
US Database Date
- Return Type:
String
This StreetData method is the same as GetDatabaseDate.
GetInitializeErrorString#
- Syntax:
GetInitializeErrorString();
- Returns:
Error Description
- Return Type:
String
This StreetData method is the same as GetInitializeErrorString.
GetLicenseExpirationDate#
- Syntax:
GetLicenseExpirationDate();
- Returns:
License Expiration Date
- Return Type:
String
This StreetData method is the same as GetLicenseExpirationDate.
Search for Street Addresses#
The FindStreet function locates the first range of street addresses that matches a submitted pattern and ZIP Code. The FindStreetNext function resets the return values of the above functions with the next matching street data record.
FindStreet#
- Syntax:
FindStreet(String StreetName, String ZIP, Boolean CodeOnly);
- Returns:
Found Street
- Return Type:
Boolean
This function retrieves the first address range that matches a given street name pattern and ZIP Code.
- Input Parameters
The FindStreet function requires the following parameters:
- StreetName:
String value. Wildcard allowed, but only at the end of the string value. For example, “MA*” for any streets beginning with “MA.”
- ZIP:
String value containing the five-digit ZIP Code.
- CodeOnly:
Boolean value defaulted to 0. If 1 is passed, FindStreet will return street records only within the supplied ZIP Code. If 0, FindStreet will also return any matching records within the city in which the ZIP Code is located.
- Return Value
The FindStreet function returns a Boolean value of 0 (FALSE) to indicate no records were found, or 1 (TRUE) to indicate a match was made.
If a match was made, call the following functions to retrieve the street data record:
If the FindStreet function is used with a Canadian address, the return values of the GetPlus4Low, GetPlus4High, GetCarrierRoute, GetCountyFips, GetCongressionalDistrict, GetLastLineNumber, GetUrbanizationCode, GetUrbanizationName, GetLACSIndicator, and GetBaseAlternateIndicator functions will not be populated.
FindStreetNext#
- Syntax:
FindStreetNext();
- Returns:
Found Next Street
- Return Type:
Boolean
This function retrieves the next StreetData record and sets the return values of the StreetData functions, based on the previous call to the FindStreet function.
- Remarks
If a match was made, call the functions detailed above to access the street data return values.
A TRUE return will allow the developer to recall the next street record data using the above-mentioned functions, after a call has initially been made to the FindStreet function.
A FALSE return means that the FindStreetNext function was unable to find any more matching street records.
If the FindStreet function was used with a Canadian address, the return values of the GetPlus4Low, GetPlus4High, GetCarrierRoute, GetCountyFips, GetCongressionalDistrict, GetLastLineNumber, GetUrbanizationCode, GetUrbanizationName, GetLACSIndicator, and GetBaseAlternateIndicator functions will not be populated.
- Input Parameters
The FindStreetNext function requires that the FindStreet function be called first.
- Return Value
The FindStreetNext function returns a Boolean value of 0 (FALSE) or 1 (TRUE).
Retrieve the Street Range Data#
The following functions retrieve the data from one range of street addresses that match a pattern submitted via the FindStreet function. An application can then cycle through multiple results using the FindStreetNext function.
GetPostDirection#
- Syntax:
GetPostDirection();
- Returns:
Following Direction
- Return Type:
String
This function returns the directional that follows the street name (if any) for the address range returned.
- Remarks
The GetPostDirection function returns a two-character maximum string value after a call to the FindStreet or FindStreetNext function.
The post-direction is a geographical directional that follows the street name. For example, in the address range of 100 N Main St E, this field will hold the “E.”
The post direction can be one of the following: “N;” “NE;” “E;” “SE;” “S;” “SW;” “W;” “NW.”
GetPreDirection#
- Syntax:
GetPreDirection();
- Returns:
Preceeding Directional
- Return Type:
String
This function returns the geographic directional that precedes the address range returned, if any.
- Remarks
The GetPreDirection function returns a two-character maximum string value after a call to the FindStreet or FindStreetNext function.
The pre-direction is a geographical directional that precedes the street name. For example, in the address range of 100 N Main St, this field will hold the “N.” Directions such as “North” will be changed to “N” before they are returned by this function.
The directional can be one of the following: “N;” “NE;” “E;” “SE;” “S;” “SW;” “W;” “NW.”
GetPrimaryRangeHigh#
- Syntax:
GetPrimaryRangeHigh();
- Returns:
Primary High Range
- Return Type:
String
This function returns the highest street number in each street data record.
- Remarks
The GetPrimaryRangeHigh function returns a 10-character maximum string value after a call to the FindStreet or FindStreetNext function. The return value contains the first number in the address range. For example, if the address range is 100 to 200 Main Street, this function will return the “0000000200” value.
All numeric data returned is padded with zeroes on the left.
A hyphen in front of the range field indicates a significant leading zero. That means that the leading zero is part of the range and is required. For example, -7 would indicate the range is 07 and cannot be just 7.
No hyphen symbol (-) indicates that the leading zeros are not a part of this range.
GetPrimaryRangeLow#
- Syntax:
GetPrimaryRangeLow();
- Returns:
Primary Low Range
- Return Type:
String
This function returns the lowest street number in each street data record.
- Remarks
The GetPrimaryRangeLow function returns a 10-character string value after a call to the FindStreet or FindStreetNext.
The return value gives the first number in the address range. For example, if the address range is 100 to 200 Main Street, this function will return the “0000000100” value.
All numeric data returned is padded with zeroes on the left. A hyphen in front of the range field indicates a significant leading zero. That means that the leading zero is part of the range and is required. For example, -7 would indicate the range is 07 and cannot be just 7.
No hyphen symbol (-) indicates that the leading zeros are not a part of this range.
GetPrimaryRangeOddEven#
- Syntax:
GetPrimaryRangeOddEven();
- Returns:
Primary Odd Even or Both
- Return Type:
String
This function returns the Odd/Even indicator for the street number range in each street data record.
Remarks The GetPrimaryRangeOddEven function returns a one-character maximum string value after a call to the FindStreet or FindStreetNext function.
This one-character value shows either an “O” for Odd, an “E” for Even, or a “B” for Both. An “O” indicates that the address range contains only odd numbered addresses and an “E” indicates that only even numbered addresses are present in the address range. A “B” indicates that both odd and even address numbers are present in the address range. For example, an “O” means that in the 101 to 201 address range, only the numbers 101, 103, 105, 107, 109, and so on, are valid address numbers
GetStreetName#
- Syntax:
GetStreetName();
- Returns:
Street Name
- Return Type:
String
This function returns the name of the street for each street data record.
- Remarks
The GetStreetName function returns a 28-character maximum string value after a call to the FindStreet or FindStreetNext function.
For street names that begin with one of the following Spanish words, that first word will be returned by the GetSuffix function and the next word in the street name will be returned as the street name. This is because Spanish street names have the suffix at the front of the address. If the suffix was not returned by the GetSuffix function, it would appear that every street in some Puerto Rican ZIP codes began with the same letter. The Spanish words that would be returned by the GetSuffix function are: “Avenida;” “Calle;” “Camino;” “Paseo;” and “Via.”
GetSuffix#
- Syntax:
GetSuffix();
- Returns:
Suffix
- Return Type:
String
This function returns the street suffix for each street data record.
- Remarks
The GetSuffix function is a four-character maximum string value set by a call to the FindStreet or FindStreetNext function.
When street names are used more than once within a city or area, street suffixes are often used to distinguish them. For example, if there is a Main Street but also a Main Avenue, this field will hold either the “St” or “Ave” suffix, depending on which one is being referred to.
Typical suffix values include: “ST;” “RD;” “AVE;” “BLVD;” “CIR;” and “PL.”
Retrieve the Street Range Data - Suite#
GetSuiteName#
- Syntax:
GetSuiteName();
- Returns:
Suite Name
- Return Type:
String
This function returns the name for the secondary range (if any) of each street record.
- Remarks
The GetSuiteName function returns a four-character maximum string value after a call to the FindStreet or FindStreetNext function.
If suite numbers exist in the address range, the return value of this function will indicate the proper suite name for addresses in that range.
Possible return values are:
“#;” “APT;” “BLDG;” “BOX;” “BSMT;” “DEPT;” “FL;” “FRNT;” “HNGR;” “LBBY;” “LOT;” “LOWR;” “OFC;” “PH” (Penthouse); “PIER;” “REAR;” “RM;” “SIDE;” “SLIP;” “SPC;” “STE;” “STOP;” “TRLR;” “UNIT;” “UPPR.”
GetSuiteRangeHigh#
- Syntax:
GetSuiteRangeHigh();
- Returns:
Suite High Range
- Return Type:
String
This function returns the highest number in the suite range associated with each street data record.
- Remarks
The GetSuiteRangeHigh function returns an eight-character maximum string value after a successful call to the FindStreet or FindStreetNext function.
The return value gives the last number in the suite range. For example, this function will return the “2001” end in the 1001 to 2001 suite range.
GetSuiteRangeLow#
- Syntax:
GetSuiteRangeLow();
- Returns:
Suite Low Range
- Return Type:
String
This function returns the lowest number in the suite range associated with each address record returned.
- Remarks
The GetSuiteRangeLow function returns an eight-character maximum string value set by a successful call to the FindStreet or FindStreetNext function.
The return value gives the first number in the suite range. For example, this function will return the “1001” end of a suite range from 1001 to 2001.
GetSuiteRangeOddEven#
- Syntax:
GetSuiteRangeOddEven();
- Returns:
Suite Odd Even or Both
- Return Type:
String
This function returns the odd/even indicator for the suite range associated with each street data record.
- Remarks
The GetSuiteRangeOddEven function returns a one-character string value after a call to the FindStreet or FindStreetNext function.
This function returns an “O” for Odd, an “E” for Even, or a “B” for Both. An “O” indicates that the suite range contains only odd numbers, an “E” indicates that only even numbers are present in the suite range, and a “B” indicates that both odd and even numbers are included in the suite range. For example, an “O” will indicate that, in the 1001 to 2001 suite range, only suite numbers 1001, 1003, 1005, 1007, and so on, are valid.
Retrieve the Street Range Data - Zip#
GetPlus4High#
- Syntax:
GetPlus4High();
- Returns:
Plus4 Highest
- Return Type:
String
This function returns the highest number in the Plus4 range for each address record returned.
- Remarks
The GetPlus4High function returns a four-character maximum string value after a call to the FindStreet or FindStreetNext function.
This field gives the last Plus4 add-on for a ZIP + 4 range. For example, if the ZIP + 4 range is 1234-1334, this field will show the “1334” value.
The GetPlus4Low and GetPlus4High function return values will usually contain the same value. In some instances, such as with PO Boxes, the GetPlus4Low and GetPlus4High functions will return different values as every PO Box has its own Plus4 code.
In these cases, the lengths of the address range and the Plus4 High-Low range will be identical and the numbers can be paired up accordingly. For example, if the address range is PO Box 100 to 200 and the Plus4 High-Low range is 0100 to 0200, “PO Box 110” will have a Plus4 of “0110.”
If the Plus4Low value is “xxxx,” this street record is deemed undeliverable by the USPS.
This function does not return a value if FindStreet was called with a Canadian address.
GetPlus4Low#
- Syntax:
GetPlus4Low();
- Returns:
Plus4 Lowest
- Return Type:
String
This function returns the lowest number in the Plus4 range for each address record returned.
- Remarks
The GetPlus4Low function returns a four-character maximum string value after a call to the FindStreet or FindStreetNext function.
This return value gives the first Plus4 add-on in a ZIP + 4 range. For example, if the ZIP + 4 range is 1234 to 1334, this field will show the “1234” value.
The GetPlus4Low and GetPlus4High function return values will usually contain the same value. In some instances, such as with PO Boxes, the GetPlus4Low function and GetPlus4High function will return different values as every PO Box has its own Plus4 code.
In these cases, the lengths of the address range and the Plus4 High-Low range will be identical and the numbers can be paired up accordingly. For example, if the address range is PO Box 100 to 200 and the Plus4 High-Low range is 0100 to 0200, “PO Box 110” will have a Plus4 of “0110.”
If the Plus4High value is “xxxx,” this street record is deemed undeliverable by the USPS.
This function does not return a value if FindStreet was called with a Canadian address.
GetZip#
- Syntax:
GetZip();
- Returns:
Zip
- Return Type:
String
This function returns the five-digit ZIP Code for each address record returned.
- Remarks
The GetZip returns the five-digit ZIP Code for the current record.
Retrieve the Street Range Data - Other#
GetAddressType#
- Syntax:
GetAddressType();
- Returns:
Plus4 Highest
- Return Type:
String
This function returns the address type for the address record returned after a successful call to the FindStreet or FindStreetNext function.
- Remarks
The GetAddressType function returns a 1-character (maximum) string value after a call to the FindStreet or FindStreetNext function. This 1-character code indicates the type of address that was returned:
Code
Type
F
Firm or Company address
G
General Delivery address
H
High Rise or Business complex
P
PO Box address
R
Rural Route address
S
Street or Residential address
GetBaseAlternateIndicator#
- Syntax:
GetBaseAlternateIndicator();
- Returns:
Base Alternate Indicator
- Return Type:
String
This function returns the base alternate indicator for the address record returned after a successful call to the FindStreet or FindStreetNext function.
- Remarks
This function returns a 1-character maximum string value after a call to the FindStreet or FindStreetNext function.
This code specifies whether or not a record is a base (preferred) or alternate record. Base records (indicated by a “B”) can represent a range of addresses or an individual address, such as a firm record, while alternate records (indicated by an “A”) are individual delivery points. Base records are generally preferred over alternate records. The base record for an alternate record can be found by matching up the ZIP + 4 ranges.
This function does not return a value if FindStreet was called with a Canadian address.
GetCarrierRoute#
- Syntax:
GetCarrierRoute();
- Returns:
Carrier Route
- Return Type:
String
This function returns the carrier route for each address record returned by a successful call to the FindStreet or FindStreetNext function.
- Remarks
This function returns a four-character string value after a successful call to the FindStreet or FindStreetNext function.
The first character returned by this function is always alphabetic and the last three characters are numeric. For example, “R001” or “C027” would be typical carrier routes. The alphabetic letter indicates the type of delivery associated with this address.
B
PO Box
H
Highway Contract
C
City Delivery
R
Rural Route
G
General Delivery
This function does not return a value if FindStreet was called with a Canadian address.
GetCompany#
- Syntax:
GetCompany();
- Returns:
Company
- Return Type:
String
This function returns the name of a company, building, apartment complex, shopping center, or other secondary name information associated with the record returned following a successful call to the FindStreet or FindStreetNext function.
- Remarks
The GetCompany function returns a 40-character maximum string value after a call to the FindStreet or FindStreetNext function.
The return value will contain the company name for each record returned, if any.
GetCongressionalDistrict#
- Syntax:
GetCongressionalDistrict();
- Returns:
Congressional District
- Return Type:
String
This function returns the congressional district associated with the address record returned.
- Remarks
The GetCongressionalDistrict function returns a four-character (maximum) string value after a call to the FindStreet or FindStreetNext function containing the standard abbreviation of the state name plus the two-digit number representing the congressional district number. For example, an address in the first district in California would return “CA01.”
For states with only one congressional representative, the value “01” is returned. To find the representative associated with this district, use the Congress.csv file located on the DVD-ROM in the \data directory. The district number and state abbreviation will be needed to locate this person.
This function does not return a value if FindStreet was called with a Canadian address.
GetCountyFips#
- Syntax:
GetCountyFips();
- Returns:
County FIPS Code
- Return Type:
String
This function returns the county FIPS code associated with each address record returned by a call to the FindStreet or FindStreetNext function.
- Remarks
The GetCountyFips function returns a five-character (maximum) string value after a call to the FindStreet or FindStreetNext function, containing Federal Information Processing Standard (FIPS), a five-digit code defined by the U.S. Bureau of Census. The first two digits are the state code and the last three indicate the county within the state.
For Example: “06037” is the County FIPS for Los Angeles, CA (“06” is the state code for California and “037” is the county code for Los Angeles).
The return value is accurate to the nine-digit ZIP + 4 level.
This function does not return a value if FindStreet was called with a Canadian address.
GetDeliveryInstallation#
- Syntax:
GetDeliveryInstallation();
- Returns:
Delivery Installation
- Return Type:
String
Canadian Addresses Only — This function returns the Delivery Installation information from a Canadian street address.
- Remarks
The GetDeliveryInstallation function returns a string value after a call to the FindStreet or FindStreetNext function.
The delivery installation is the post office facility responsible for delivering to the current address. It is often used for rural addresses or when multiple post offices service the same municipality.
GetLACSIndicator#
- Syntax:
GetLACSIndicator();
- Returns:
LACS Indicator
- Return Type:
String
This function returns the LACS indicator for each address record that is returned by a successful call to the FindStreet or FindStreetNext function.
- Remarks
The GetLACSIndicator function returns a one-character value after a call to the FindStreet or FindStreetNext function.
Some rural route addresses are modified to city-style addresses to allow emergency services (for example, ambulance, police, fire, and so on) to find these addresses more efficiently.
An empty space in the return value indicates that the address has not undergone a conversion. A value of “L” in the GetLACSIndicator return value indicates that the address has undergone a conversion. After a conversion, the old address is retained in the ZIP + 4 file for a period of one year. After the one year period, the old addresses will be dropped from the ZIP + 4 file and the address checking logic will not assign a ZIP + 4 for this address.
The new addresses are not contained within the ZIP + 4 file. To change the old addresses to the new addresses, you will either need to send these addresses to a company that does LACSLink processing or use the LACSLink functionality available through the AddressCheck Interface.
This function does not return a value if FindStreet was called with a Canadian address.
GetLastLineNumber#
- Syntax:
GetLastLineNumber();
- Returns:
Last Line Number
- Return Type:
String
This function returns the last line number for each address record returned.
- Remarks
The GetLastLineNumber function returns a six-character (maximum) string value after a call to the FindStreet or FindStreetNext function.
The last line number is a six-character string used for advanced address matching. This number can be associated with last line numbers returned from the city name in the Data Interface to break ties based off of city names.
This number is used with address matching to break ties on certain records using the city name.
This function does not return a value if FindStreet was called with a Canadian address.
GetUrbanizationCode#
- Syntax:
GetUrbanizationCode();
- Returns:
Urbanization Code
- Return Type:
String
This function returns the urbanization code for each street data record.
- Remarks
The GetUrbanizationCode returns a six-character maximum string value after a call to the FindStreet or FindStreetNext function. This code is used for addresses in Puerto Rico only.
GetUrbanizationName#
- Syntax:
GetUrbanizationName();
- Returns:
Urbanization Name
- Return Type:
String
This function returns the urbanization name for each street data record.
- Remarks
The GetUrbanizationName function returns a string value after a call to the FindStreet or FindStreetNext function. The urbanization name is used for addresses in Puerto Rico only.
Check Address Against Results#
This function allows you to check a parsed address against the ranges returned by the FindStreet function.
IsAddressInRange2#
- Syntax:
IsAddressInRange2(String InputRange, String LoRange, String HiRange, Boolean OddEvenFlag);
- Returns:
Is In Range
- Return Type:
Boolean
The IsAddressInRange2 function determines if an address, when compared against a USPS address record, falls within the address range of the USPS address record and matches the record at the Odd/Even level.
- Remarks
Although this appears to be a simple process, alpha-numeric addresses such as “Five,” “105B” or “19 1/2,” which this function is equipped to handle, should be taken into account.
If the VerifyAddress function indicates multiple matches, using this function in conjunction with the FindStreet and FindStreetNext functions makes it relatively simple to match the submitted address to a valid address record.
If you previously used the IsAddressInRange function, this has been superceded by the IsAddressInRange2 function and it is now deprecated. The new function was introduced because this function did not consider whether the address range to be tested contained odd numbers, even numbers, or both.
- Input Parameters
The IsAddressInRange2 function takes the following four parameters in the order given: InputRange; LowRange; HiRange; and OddEvenFlag. The LowRange, HiRange, and OddEvenFlag are obtained with the GetPrimaryRangeLow, GetPrimaryRangeHigh, and GetPrimaryRangeOddEven functions after a successful call to the FindStreet and FindStreetNext functions.
- Return Value
The IsAddressInRange2 function returns a 1 if the input is in range and matches the Odd/Even range. It returns a 0 if the input falls out of range or does not match the Odd/Even range.
- Examples
123 Main St. will return a 1 if “123” falls within the range and this range contains odd numbers or both odd and even numbers.
124 Main St. will return a 1 if “124” falls within the range and this range contains even numbers or both odd and even numbers.
Auto-Complete#
This function allows you to enable auto-complete for StreetData in Address Object.
GetAutoCompletion#
- Syntax:
GetAutoCompletion(String Address, String Zip, mdStreet.AutoCompletionMode enumeration, Boolean DPV_on_or_off);
- Returns:
Suggested Address
- Return Type:
String
The GetAutoCompletion method returns possible street address matches based off of a 5-digit US Zip code and at least one character of a street address. This method will return one possible street address with each call. The user can cycle through the entire list of possible street addresses by calling GetAutoCompletion until it returns an empty string.
- Remarks
It is recommended that the user waits until at least four characters or an alphabet letter before calling GetAutoCompletion. Calling GetAutoCompletion (“1”, “92688”, mdStreet.AutoCompletionMode, AutoCompleteSingleSuite, true) will return every street address in the zip code “92688” that starts with “1”. This will be a large number of addresses and is usually not useful for the end user. It would be much more user friendly to wait until a more complete number is entered. For example, waiting until “1423” is entered and then calling GetAutoCompletion so the returned address list is more limited and useful.
The GetAutoCompletion function has the data type AutoCompletionMode that uses an enumeration to specify the handling of suites in the suggested street address.
Enumerated Value |
Integer Value |
Description |
---|---|---|
AutoCompleteSingleSuite |
0 |
Show each individual suite. Ex: 123 Main Apt 1, 123 Main Apt 2 |
AutoCompleteRangedSuite |
1 |
Show the suite ranges. Ex: 123 Main Apt 1-10, 123 Main Apt 20-30 |
AutoComplete PlaceHolderSuite |
2 |
Use a ‘#’ to denote where a suite should go. Ex: 123 Main # |
AutoCompleteNoSuite |
3 |
Do not show suites. Ex: 123 Main |
Languages that do not use enumerations will use the equivalent integer value.
- Input Parameters
The GetAutoCompletion function takes the following four parameters in the order given:
string streetAddress: The full or a portion of a street address (123 main st)
string Zip: A full 5-digit US Zip code
mdStreet.AutoCompletionMode enumeration: enumeration concerning handling of suites
bool DPV_on_or_off: True to return only DPV valid street addresses. False to return all street addresses
Example:
String SuggestAddr;
so.ResetAutoCompletion();
while ((SuggestAddr =
so.GetAutoCompletion(txtAddress.Text.Trim(),
txtZip.Text.Trim(), mode, true)) != "")
{
//Display SuggestAddr
}
ResetAutoCompletion#
- Syntax:
ResetAutoCompletion();
- Return Type:
Void
The ResetAutoCompletion function resets the auto-completion, preparing the object for a new record.
- Remarks
Call this function before calling a new record.
Calling this function ensures that the function will operate properly for the new record.
ZipData Interface#
Initialize the ZipData Interface - Set#
Initializing the ZipData Interface is slightly different than the procedure for the AddressCheck Interface.
Initialize#
- Syntax:
Initialize(String DataPath, String NationalPath, String RegionalPath);
- Returns:
Initialization Status
- Return Type:
ProgramStatus
This ZipData method is the same as Initialize.
SetLicenseString#
- Syntax:
SetLicenseString(String License);
- Returns:
Is License Correct
- Return Type:
Boolean
This ZipData method is the same as SetLicenseString.
Initialize the ZipData Interface - Get#
GetBuildNumber#
- Syntax:
GetBuildNumber();
- Returns:
Build Number
- Return Type:
String
This StreetData method is the same as GetBuildNumber.
GetDatabaseDate#
- Syntax:
GetDatabaseDate();
- Returns:
US Database Date
- Return Type:
String
This StreetData method is the same as GetDatabaseDate.
GetInitializeErrorString#
- Syntax:
GetInitializeErrorString();
- Returns:
Error Description
- Return Type:
String
This StreetData method is the same as GetInitializeErrorString.
GetLicenseExpirationDate#
- Syntax:
GetLicenseExpirationDate();
- Returns:
License Expiration Date
- Return Type:
String
This StreetData method is the same as GetLicenseExpirationDate.
Retrieve ZIP Code and City Data#
The three main functions of the ZipData Interface retrieve information based on ZIP Code or city names.
FindCityInState#
- Syntax:
FindCityInState(String City, String State);
- Returns:
Found City In State
- Return Type:
Boolean
This function returns the first city or only city (if no wildcard is used) for the city, state combination passed to this function.
- Remarks
A TRUE return will set the return values of the GetCity and GetState functions with the data of the record returned.
A FALSE return indicates that the FindCityInState function could not locate the city passed to the function.
- Input Parameters
The FindCityInState function has these two parameters:
- City:
A 28-character maximum string that contains the city name to look up. For example: “Los Angeles” or a WildCard (*) such as “Los A*”
- State:
A two-character string that contains the state abbreviation where the city is located in (Wildcard not allowed in this function).
- Return Value
The FindCityInState function returns a Boolean value of 0 (FALSE) or 1 (TRUE).
FindCityInStateNext#
- Syntax:
FindCityInStateNext();
- Returns:
Found Next City In State
- Return Type:
Boolean
This function retrieves the next city for the city, state combination passed to the FindCityInState function.
- Remarks
A TRUE return indicates that the function has set the return values of the GetCity and GetState functions with the values from the next record returned.
A FALSE return indicates that the FindCityInStateNext function could not locate any more cities for the city passed to FindCityInState
- Input Parameters
The FindCityInStateNext function operates on the city passed to the FindCityInState function. You MUST call the FindCityInState function before you call the FindCityInStateNext function.
- Return Value
The FindCityInStateNext function returns a Boolean value of 0 (FALSE) or 1 (TRUE).
FindZip#
- Syntax:
FindZip(String Zip, Boolean GetLastLineRecord);
- Returns:
Found Zip
- Return Type:
Boolean
This function returns the first record of the ZIP Code passed in, unless the optional GetLastLineRecord = 1 is passed as well. If this happens, it will return the last line record for the ZIP Code passed in.
- Remarks
If the return value is TRUE, this function sets the following functions:
GetAreaCode GetLastLineIndicator GetLastLineNumber GetPreferredLastLineNumber GetAutomation GetFacilityCode GetCity GetState GetZip GetCityAbbreviation GetCountyFips GetCountyName GetZipType GetLatitude GetLongitude GetTimeZone GetTimeZoneCode
A TRUE return will set all of the above-mentioned functions with the data of the record returned.
A FALSE return indicates that the FindZip function could not locate the ZIP Code passed in.
- Input Parameters
The FindZip function has the following parameters:
- Zip:
A five-character string value that contains the ZIP Code to look up. Example: “92688”
- GetLastLineRecord:
Optional Boolean value. A “0” is the default value but you may also pass in a “1” to retrieve the last line record for the ZIP Code. This will return the official city name for the ZIP Code. If you set this option to “1,” you will not be able to call the FindZipNext function.
- Return Value
The FindZip function returns a Boolean value of 0 (FALSE) or 1 (TRUE).
FindZipNext#
- Syntax:
FindZipNext();
- Returns:
Found Next Zip
- Return Type:
Boolean
This function retrieves the next record of the ZIP Code passed into the FindZip function.
- Remarks
If the return value is TRUE, this function sets the return values for the same functions as the FindZip function.
A TRUE return will set all of the above-mentioned functions with the data of the record returned.
A FALSE return indicates that the FindZipNext function could not locate another record for the ZIP Code passed in.
- Input Parameters
The FindZipNext function operates on the ZIP passed to the FindZip function. You MUST call the FindZip function before you call the FindZipNext function.
If you passed a “1” for the optional GetLastLineRecord parameter in the FindZip function, you cannot call the FindZipNext function.
- Return Value
The FindZipNext function returns a Boolean value of 0 (FALSE) or 1 (TRUE).
FindZipInCity#
- Syntax:
FindZipInCity(String City, String State);
- Returns:
Found Zip Code For City
- Return Type:
String
This function returns the first ZIP Code for the city, state combination passed to the FindZipInCity function.
- Remarks
If the return value is TRUE, this function sets the return values for the following functions:
GetLastLineIndicator GetLastLineNumber GetPreferredLastLineNumber GetAutomation GetFacilityCode GetZipType GetCity GetState GetZip GetCityAbbreviation GetCountyFips GetCountyName GetLatitude GetLongitude GetTimeZone GetTimeZoneCode
A TRUE return will set all of the above-mentioned functions with the data of the record returned.
A FALSE return indicates that the FindZipInCity function could not locate the city passed in.
- Input Parameters
The FindZipInCity function has these two parameters:
- City:
A 28-character (maximum) string that contains the city name to look up
- State:
A two-character string that contains the state the city is located in
- Return Value
The FindZipInCity function returns a Boolean value of 0 (FALSE) or 1 (TRUE)
FindZipInCityNext#
- Syntax:
FindZipInCityNext();
- Returns:
Found Next Zip For City
- Return Type:
String
This function retrieves the next ZIP Code for the city, state combination passed to the FindZipInCity function.
- Remarks
If the return value is TRUE, this function sets the same functions as the FindZipInCity function.
A TRUE return will set all of the above-mentioned functions with the data of the record returned.
A FALSE return indicates that the FindZipInCityNext function could not locate any more ZIP Codes for the city passed in.
- Input Parameters
The FindZipInCityNext function operates on the ZIP passed to the FindZipInCity function. You MUST call the FindZipInCity function before you call the FindZipInCityNext function.
- Return Value
The FindZipInCityNext function returns a Boolean value of 0 (FALSE) or 1 (TRUE).
Retrieve ZIP and City Data#
These functions retrieve the data returned as a result of calls to the ZipData Interface’s three main functions:
GetAreaCode#
- Syntax:
GetAreaCode();
- Returns:
Area Code
- Return Type:
String
This function returns the area code associated with the ZIP Code after a successful call to the FindZip and FindZipNext functions.
- Remarks
The GetAreaCode function returns a three-character string value after a call to the FindZip and FindZipNext functions.
If a ZIP Code has more than one area code assigned to it, the dominant area code will be returned.
GetAutomation#
- Syntax:
GetAutomation();
- Returns:
Automaton
- Return Type:
String
This function returns the carrier route rate mail indicator after a successful call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
- Remarks
The return value is an indicator that specifies the following conditions for letter-size carrier route sorted mail:
Code
Explanation
A
Carrier route sortation rates apply for this ZIP Code and merging is permitted.
B
Carrier route sortation rates apply for this ZIP Code and merging is not permitted.
C
Carrier route sortation rates do not apply for this ZIP Code and merging is permitted.
D
Carrier route sortation rates do not apply for this ZIP Code and merging is not permitted.
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetCity#
- Syntax:
GetCity();
- Returns:
City
- Return Type:
String
This function returns the full city name associated with the input information.
- Remarks
The GetCity function returns a 28-character (maximum) string value after a call to the FindZip, FindZipNext, FindZipInCity, FindCityInState, FindCityInStateNext, or FindZipInCityNext function.
The return value of the GetCity function will contain the city name for the input ZIP Code. If the city name is longer than 13 letters, the GetCityAbbreviation function will also return a value.
GetCityAbbreviation#
- Syntax:
GetCityAbbreviation();
- Returns:
City Abbreviation
- Return Type:
String
This function returns the official 13-letter city name abbreviation after a successful call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
- Remarks
If the return value of the GetCity function is longer than 13 letters, the GetCityAbbreviation function will return the official abbreviation the Post Office has associated with that city or municipality name. For example, for “Rancho Santa Margarita,” the GetCityAbbreviation function will return the abbreviation “Rcho Sta Marg.”
If the return value of the GetCity function is 13 letters long or shorter, the GetCityAbbreviation function will return the full city or municipality name.
GetCountyFIPS#
- Syntax:
GetCountyFIPS();
- Returns:
County FIPS
- Return Type:
String
This function returns the county FIPS code for each ZIP Code record.
- Remarks
The GetCountyFips function is a five-character string value set by a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
The Federal Information Processing Standard (FIPS) is a five-digit code defined by the U.S. Bureau of Census. The first two digits are the ZIP Code and the last three indicate the county within the state.
For Example: “06037” is the County FIPS for Los Angeles, CA (“06” is the ZIP Code for California and “037” is the county code for Los Angeles).
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetCountyName#
- Syntax:
GetCountyName();
- Returns:
County Name
- Return Type:
String
This function returns the name of the county associated with the input ZIP Code.
- Remarks
The GetCountyName function returns a 25-character string after a successful call to the FindZip or FindZipNext function.
GetFacilityCode#
- Syntax:
GetFacilityCode();
- Returns:
Facility Code
- Return Type:
String
This function returns the facility code for each ZIP Code record returned.
- Remarks
After a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function, the GetFacilityCode function returns a one-character string value that indicates the type of postal facility:
Code
Type
A
Airport Mail Facility
B
Branch
C
Community Post Office
D
Area Distribution Center
E
Sectional Center Facility
F
Delivery Distribution Center
G
General Mail Facility
K
Bulk Mail Facility
M
Money Order Unit
N
Community or Place name
P
Post Office
S
Station
U
Urbanization (Used in Puerto Rico)
X
Vanity name (Should not be used)
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetLastLineIndicator#
- Syntax:
GetLastLineIndicator();
- Returns:
Last Line Indicator
- Return Type:
String
This function returns the last line indicator for the returned ZIP Code data.
- Remarks
The GetLastLineIndicator function returns a one-character string value after a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function. An “L” in this field indicates that the city name is the official U. S. Postal Service name for the ZIP Code (Only one record per ZIP Code is coded with an “L”).
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetLastLineNumber#
- Syntax:
GetLastLineNumber();
- Returns:
Last Line Number
- Return Type:
String
This function returns the last line number of each ZIP record returned.
- Remarks
The GetLastLineNumber function returns a six-character string value after a call to FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function. This number is used with address matching to break ties on certain records using the city name.
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetLatitude#
- Syntax:
GetLatitude();
- Returns:
Latitude
- Return Type:
String
This function returns the latitude as a string for the geographic center of a ZIP Code.
- Remarks
Latitude is the geographic coordinate of a point measured in degrees north or south of the equator.
The GetLatitude function returns a seven-character string value after a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function. The latitude returned will be accurate to 4 decimal places and will always be positive to indicate a latitude in the United States, which is north of the equator.
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetLongitude#
- Syntax:
GetLongitude();
- Returns:
Longitude
- Return Type:
String
This function returns the longitude as a string for the geographic center of a ZIP Code.
- Remarks
Longitude is the geographic coordinate of a point measured in degrees east or west of the Greenwich Meridian.
The GetLongitude function returns the longitude of the record after a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function. It is accurate to 6 decimal places and the negative sign is used to indicate a longitude in the United States.
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetPreferredLastLineNumber#
- Syntax:
GetPreferredLastLineNumber();
- Returns:
Preferred Last Line Number
- Return Type:
String
This function returns the preferred last line number for each ZIP Code record.
- Remarks
The GetPreferredLastLineNumber function returns a six-character string value containing the preferred last line number for the city name, after a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
This is similar to the GetLastLineNumber function mentioned earlier. If the preferred last line number is the same as the last line number, this city name is the one the Post Office will recognize as the official name for that ZIP Code.
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetState#
- Syntax:
GetState();
- Returns:
State
- Return Type:
String
This function returns the state name abbreviation from each ZIP Code record.
- Remarks
The GetState function returns a two-character string value containing the two-letter abbreviation for the state name, after a call to the FindZip, FindZipNext, FindZipInCity, FindCityInState, FindCityInStateNext, or FindZipInCityNext function.
GetTimeZone#
- Syntax:
GetTimeZone();
- Returns:
Time Zone
- Return Type:
String
This function returns the time zone for each ZIP Code record.
- Remarks
All Melissa Data products express time zones in UTC (Coordinated Universal Time).
The GetTimeZone function returns a 20-character (maximum) string value after a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
These are the strings that can be returned:
"Military" "Mountain Time" "Samoa Time" "Atlantic Time" "Pacific Time" "Marshall Islands Time" "Eastern Time" "Alaska Time" "Guam Time" "Central Time" "Hawaii Time" "Palau Time"
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetTimeZoneCode#
- Syntax:
GetTimeZoneCode();
- Returns:
Time Zone Code
- Return Type:
String
This function returns a one or two-digit code for the time zone that contains the specified ZIP Code.
- Remarks
The GetTimeZoneCode function returns a one or two-digit number representing the time zone for the record returned after a call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
These are the possible values for the GetTimeZone function:
Code
Zone
Code
Zone
0
Military (APO or FPO)
9
Alaska Time
4
Atlantic Time
10
Hawaii Time
5
Eastern Time
11
Samoa Time
6
Central Time
12
Marshall Island Time
7
Mountain Time
14
Guam Time
8
Pacific Time
15
Palau Time
This function does not return a value when the ZipData interface is used with a Canadian postal code.
GetZip#
- Syntax:
GetZip();
- Returns:
Zip
- Return Type:
String
This function returns the five-digit ZIP Code for the current record.
- Remarks
The GetZip function returns a five-character string containing the ZIP Code for the current record, after a successful call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
GetZipType#
- Syntax:
GetZipType();
- Returns:
Zip Type
- Return Type:
String
This function returns the ZIP Code type for each record returned.
- Remarks
The GetZipType function returns a one-character string after a successful call to the FindZip, FindZipNext, FindZipInCity, or FindZipInCityNext function.
The return value of the GetZipType function defines the class of ZIP Code for delivery purposes.
Code
Explanation
P
A ZIP Code used only for PO Boxes.
U
Unique: A ZIP Code assigned to an organization or government institution such as the IRS.
M
Military: A ZIP Code assigned to an APO/FPO.
Empty
A standard ZIP Code.
This function does not return a value when the ZipData interface is used with a Canadian postal code.
Computation Functions#
The following functions do not require the data files to be initialized. They can be used with the GetLatitude and GetLongitude functions to calculate distances and bearing between two records.
ComputeBearing#
- Syntax:
ComputeBearing();
- Returns:
Bearing
- Return Type:
DoubleFloat
The ComputeBearing function returns a bearing in degrees (0 to 360) representing the compass direction from point 1 to point 2.
North is 0 degrees, East is 90, South is 180, and West is 270.
- Remarks
You do not have to call the Initialize function before the ComputeBearing function is called.
- Input Parameters
This function accepts four double-precision floating point numbers.
lat1 — Latitude for point 1 [In Degrees (90 to -90)]
long1 — Longitude for point 1 [In Degrees (180 to -180)]
lat2 — Latitude for point 2 [In Degrees (90 to -90)]
long2 — Longitude for point 2 [In Degrees (180 to -180)]
Negative longitudes lie west of the Greenwich Meridian, positive longitudes to the east. Longitudes for the continental U.S. are in the range from -65 to -125 degrees.
- Return Value
The ComputeBearing function returns the bearing based on the input latitudes and longitudes. If an invalid latitude or longitude is entered, a value of 999 will be returned.
ComputeDistance#
- Syntax:
ComputeDistance();
- Returns:
Distance
- Return Type:
DoubleFloat
The ComputeDistance function returns a distance in miles between point 1 and point 2.
- Remarks
You do not have to call the Initialize function before the ComputeDistance function is called.
- Input Parameters
This function accepts four double-precision floating point numbers.
lat1 — Latitude for point 1 [In Degrees (90 to -90)]
long1 — Longitude for point 1 [In Degrees (180 to -180)]
lat2 — Latitude for point 2 [In Degrees (90 to -90)]
long2 — Longitude for point 2 [In Degrees (180 to -180)]
Negative longitudes lie west of the Greenwich Meridian, positive longitudes to the east. Longitudes for the continental U.S. are in the range from -65 to -125 degrees.
- Return Value
The ComputeDistance function returns the distance between two points based on the input latitudes and longitudes. If an invalid latitude or longitude is entered, a value of 9999 will be returned.
Parse Interface#
Initialize the Parse Interface#
The Parse Interface does not need to be initialized in the same manner as the other interfaces, nor does it require a license string to use.
GetBuildNumber#
- Syntax:
GetBuildNumber();
- Returns:
Build Number
- Return Type:
String
This Parse Interface method is the same as GetBuildNumber.
Parse an Address#
These two functions parse a submitted street address and then return all possible variations on how the address can be parsed.
Parse#
- Syntax:
Parse(String AddressToParse);
- Returns:
Success
- Return Type:
Boolean
The Parse function will separate an input address string into its individual components and populate the return values of the appropriate functions with those string values.
- Input Parameters
The Parse function has one parameter:
- AddressToParse:
A string that contains the full street address to be parsed, such as “123 N Main St. E Apt 3.”
- Return Value
The Parse function always returns a Boolean value of 1 to indicate TRUE.
Use the following functions to retrieve the parsed address:
GetRange GetPreDirection GetStreetName GetSuffix GetPostDirection GetSuiteName GetSuiteNumber GetPrivateMailboxName GetPrivateMailboxNumber GetGarbage
ParseCanadian#
- Syntax:
ParseCanadian(String AddressToParse);
- Returns:
Success
- Return Type:
Boolean
Canada Only — This function is identical to the Parse function, except that it must be used when parsing Canadian street address.
- Remarks
The usage for this function is the same as it is for the Parse function, except that it also returns values to the following functions:
GetRouteService GetLockBox GetDeliveryInstallation
ParseNext#
- Syntax:
ParseNext();
- Returns:
Success
- Return Type:
Boolean
The ParseNext function will juggle the address components separated in a first call to either the Parse or ParseCanadian function. This is sometimes useful when trying to match addresses and the first parse failed to find a match.
- Input Parameters
The ParseNext function has no parameters, it can only be called after a call to the Parse or ParseCanadian function.
ParseNext acts on the input AddressToParse string passed into the Parse or ParseCanadian function.
- Return Value
The ParseNext function returns a Boolean value of 0 (FALSE) to indicate there are no more parses, or a Boolean value of 1(TRUE) to indicate another possible parse was returned.
Use the following functions to retrieve the parsed address:
GetRange GetPreDirection GetStreetName GetSuffix GetPostDirection GetSuiteName GetSuiteNumber GetPrivateMailboxName GetPrivateMailboxNumber GetGarbage
For Canadian addresses, you will also need the following functions:
GetRouteService GetLockBox GetDeliveryInstallation
Retrieve the Parsed Address Components#
These functions return the parsed components of a street address after a call to the Parse, ParseCanadian, or ParseNext function.
GetDeliveryInstallation#
- Syntax:
GetDeliveryInstallation();
- Returns:
Delivery Installation
- Return Type:
String
Canada Only — This function returns the Delivery Installation information from a parsed Canadian street address.
- Remarks
The delivery installation is the post office facility responsible for delivering to the current address. It is often used for rural addresses or when multiple post offices service the same municipality.
GetGarbage#
- Syntax:
GetGarbage();
- Returns:
Garbage Characters
- Return Type:
String
This function returns any garbage characters left over after a street address has been parsed.
- Remarks
The GetGarbage function is a 50-character maximum string value set by a call to the Parse function containing any characters or tokens that do not belong to the address string passed into the Parse function. Common items found in this field are community center names, names of individuals, additional delivery instructions, and so on.
- Example
“West Wing” or “Beaumont Main Office”
GetLockBox#
- Syntax:
GetLockBox();
- Returns:
Lock Box
- Return Type:
String
Canada Only — This function returns the Lock Box information from a parsed Canadian street address.
- Remarks
A lock box is the Canadian equivalent of a Post Office Box in the U.S. (The two terms are often used interchangeably in Canada).
GetPostDirection#
- Syntax:
GetPostDirection();
- Returns:
Following Direction
- Return Type:
String
This function returns any geographic directional that follows the street name.
- Remarks
The GetPostDirection function returns a two-character maximum string value containing the abbreviated post-direction of the full address string passed into the Parse function. Directions such as “North” will be changed to “N” before they are returned by this function.
GetPreDirection#
- Syntax:
GetPreDirection();
- Returns:
Preceeding Direction
- Return Type:
String
This function returns the geographic directional that precedes the street name.
- Remarks
The GetPreDirection function is a two-character string value set by a call to the Parse function.
The pre-direction is a geographical directional that precedes the street name. For example, in the address range of 100 N Main St, this field will hold the “N.” Directions such as “North” will be changed to “N” before they are returned by this function.
The directional can be one of the following: “N;” “NE;” “E;” “SE;” “S;” “SW;” “W;” “NW.”
GetPrivateMailboxName#
- Syntax:
GetPrivateMailboxName();
- Returns:
Private Mailbox Name
- Return Type:
String
This function returns the private mailbox name portion of a parsed address.
- Remarks
The Parse Interface will not identify an address as a PMB unless the string passed to the Parse function contains the “PMB” abbreviation.
GetPrivateMailboxNumber#
- Syntax:
GetPrivateMailboxNumber();
- Returns:
Private Mailbox Number
- Return Type:
String
This function returns the private mailbox number portion of a parsed address.
- Remarks
The Parse Interface will not identify an address as a PMB unless the string passed to the Parse function contains the “PMB” abbreviation.
GetRange#
- Syntax:
GetRange();
- Returns:
Range
- Return Type:
String
This function returns the delivery number of a parsed address.
- Remarks
The GetRange function returns a 10-character maximum string value that contains the range portion of the address string passed to the Parse function.
GetRouteService#
- Syntax:
GetRouteService();
- Returns:
Route Service
- Return Type:
String
Canada Only — This function returns the route service information from a parsed Canadian street address.
- Remarks
Route service is a term used to refer to what the USPS would call a Rural Route address.
GetStreetName#
- Syntax:
GetStreetName();
- Returns:
Street Name
- Return Type:
String
This function returns the name of the street from a parsed address.
- Remarks
The GetStreetName function returns a maximum 28-character string set by a call to the Parse function.
GetSuffix#
- Syntax:
GetSuffix();
- Returns:
Suffix
- Return Type:
String
This function returns the suffix portion of a parsed address.
- Remarks
The GetSuffix function returns a four-character maximum string value containing the abbreviated suffix of the full address string passed into the Parse function.
When street names are used more than once within a city or area, street suffixes are often used to distinguish them. For example, if there is a Main Street but also a Main Avenue, this field will hold either the “St” or “Ave” suffix, depending on which one is being referred to.
Typical suffix values include: “ST;” “RD;” “AVE;” “BLVD;” “CIR;” and “PL.”
GetSuiteName#
- Syntax:
GetSuiteName();
- Returns:
Suite Name
- Return Type:
String
This function returns the name of the secondary unit of a parsed address.
- Remarks
The GetSuiteName function returns a four-character maximum string value containing the suite name portion from the full address string passed into the Parse function.
Possible return values are: “#;” “APT;” “BLDG;” “BOX;” “BSMT;” “DEPT;” “FL;” “FRNT;” “HNGR;” “LBBY;” “LOT;” “LOWR;” “OFC;” “PH” (Penthouse); “PIER;” “REAR;” “RM;” “SIDE;” “SLIP;” “SPC;” “STE;” “STOP;” “TRLR;” “UNIT;” “UPPR.”
GetSuiteNumber#
- Syntax:
GetSuiteNumber();
- Returns:
Suite Number
- Return Type:
String
This function returns the range of any secondary unit of a parsed address.
- Remarks
The GetSuiteNumber function returns a six-character maximum string value containing the suite number of the full address string passed into the Parse function.
Parse Last Lines#
Use these functions to break a single string value into city, state, and ZIP Code.
LastLineParse#
- Syntax:
LastLineParse(String LastLine);
- Return Type:
Void
The LastLineParse function parses a single string value containing a city, state, and ZIP Code string into separate string values.
- Remarks
After calling this function, call the GetCity, GetState, GetZip, and GetPlus4 functions to retrieve the parsed values.
- Input Parameters
This function has a single input parameter:
- LastLine:
A single city, state, and ZIP Code string, such as “Rancho Santa Margarita, CA 92688-2112.”
This function can be used for both U.S. and Canadian cities.
GetCity#
- Syntax:
GetCity();
- Returns:
City
- Return Type:
String
This function returns the city name as parsed from the LastLineParse function.
- Remarks
The GetCity function returns the city portion of a parsed Last Line string after a call to the LastLineParse function.
GetState#
- Syntax:
GetState();
- Returns:
State
- Return Type:
String
This function returns the state name abbreviation as parsed from the LastLineParse function.
- Remarks
The GetState function returns the state portion of a parsed Last Line string after a call to the LastLineParse function.
GetPlus4#
- Syntax:
GetPlus4();
- Returns:
Plus4
- Return Type:
String
This function returns the Plus4 extension of the ZIP Code from a successful call to the LastLineParse function.
- Remarks
The LastLineParse function does not do any address checking, therefore if the string passed to the function does not contain a recognizable four-digit ZIP add-on, this function will not return a value.
Also, if the LastLineParse function is used with a Canadian municipality, province and postal code, this function will not return a value.
GetZip#
- Syntax:
GetZip();
- Returns:
Zip
- Return Type:
String
This function returns the ZIP Code as parsed from the LastLineParse function.
Result Codes#
For details of all result codes please visit here.
AS - Address Status#
Code |
Short Description |
Long Description |
---|---|---|
|
Address Fully Verified |
The address is valid and deliverable according to official postal agencies. |
|
Valid Building Address |
The building address was verified but the suite/apartment number is missing or invalid. |
|
Non USPS Address Match |
US Only. This US address is not serviced by the USPS but does exist and may receive mail through third party carriers like UPS. |
|
Proprietary Address Format |
The address uses a proprietary addressing scheme where only the format could be validated. |
|
Foreign Address |
The address is in a non-supported country. |
|
CMRA Address |
US Only. The address is a Commercial Mail Receiving Agency (CMRA) like a Mailboxes Etc. These addresses include a Private Mail Box (PMB or #) number. |
|
PBSA Address |
A PO Box formatted as a street address for package and mail delivery. |
|
Address Updated By LACS |
US Only. The address has been converted by LACSLink® from a rural-style address to a city-style address. |
|
Suite Appended |
US Only. A suite was appended by SuiteLink™ using the address and company name. |
|
Apartment Appended |
An apartment number was appended by AddressPlus using the address and last name. |
|
Vacant Address |
US Only. The address has been unoccupied for more than 90 days. |
|
No USPS Mail Delivery |
This address is classified as not receiving mail by the USPS via their No-Stat flag. Delivery might still be possible by third party carriers but that cannot be counted on. |
|
DPV Locked Out |
US Only. DPV processing was terminated due to the detection of what is determined to be an artificially created address. |
|
Deliverable only by USPS |
US Only. This address can only receive mail delivered through the USPS (i.e. PO Box or a military address). |
|
No Alternate Address Suggestion Found |
No alternate address suggestion was found for this address. |
|
Extraneous Suite Information |
Extraneous information not used in verifying the address was found. This information was returned in the suite field. |
|
USPS Door Not Accessible |
Address identified by the USPS where carriers cannot physically access a building or door for mail delivery. |
|
Unique ZIP code |
The address contains a USPS unique ZIP code which means any address may be marked as deliverable. |
|
Unknown Data Moved to ParsedGarbage |
The input contains data that could not be identified. That data is returned in the ParsedGarbage/AddressExtras field |
|
Phantom Route address |
Addresses that are assigned to a phantom route of R777 or R779. |
AE - Address Error#
Code |
Short Description |
Long Description |
---|---|---|
|
General Error |
The address could not be verified. This is likely due to a missing or invalid locality or postal code. |
|
Unknown Street |
Could not match the input street to a unique street name. Either no matches or too many matches found. |
|
Component Mismatch Error |
The combination of directionals (N, E, SW, etc) and the suffix (AVE, ST, BLVD) is not correct and produced multiple possible matches. |
|
Non-Deliverable Address |
US Only. A physical plot exists but is not a deliverable addresses. One example might be a railroad track or river running alongside this street, as they would prevent construction of homes in that location. |
|
Multiple Match |
The address was matched to multiple records. There is not enough information available in the address to break the tie between multiple records. |
|
Early Warning System |
US Only. This address currently cannot be verified but was identified by the Early Warning System (EWS) as belonging to a upcoming area and will likely be included in a future update. |
|
Missing Minimum Address |
Minimum requirements for the address to be verified is not met. Address must have at least one address line and also the postal code or the locality/administrative area. |
|
Sub Premise Number Invalid |
The thoroughfare (street address) was found but the sub premise (suite) was not valid. |
|
Sub Premise Number Missing |
The thoroughfare (street address) was found but the sub premise (suite) was missing. |
|
Premise Number Invalid |
The premise (house or building) number for the address is not valid. |
|
Premise Number Missing |
The premise (house or building) number for the address is missing. |
|
Box Number Invalid |
The PO (Post Office Box), RR (Rural Route), or HC (Highway Contract) Box number is invalid. |
|
Box Number Missing |
The PO (Post Office Box), RR (Rural Route), or HC (Highway Contract) Box number is missing. |
|
PMB Number Missing |
US Only. The address is a Commercial Mail Receiving Agency (CMRA) and the Private Mail Box (PMB or #) number is missing. |
|
Demo Mode |
Limited to Demo Mode operation. Please contact a Melissa Data CSR at 1-800-800-6245 x4. |
|
Expired Database |
The Database has expired. Please contact a Melissa Data CSR at 1-800-800-6245 x4. |
|
Sub Premise Not Required (Deprecated - See AS23) |
A sub premise (suite) number was entered but the address does not have secondaries. (Deprecated - See AS23) |
|
Find Suggestion Timeout |
The FindSuggestion function has exceeded the time limit. |
|
Find Suggestion Disabled |
The FindSuggestion function is disabled. See the manual for further details. |
AC - Address Change#
Code |
Short Description |
Long Description |
---|---|---|
|
Postal Code Change |
The postal code was changed or added. |
|
Administrative Area Change |
The administrative area (state, province) was added or changed. |
|
Locality Change |
The locality (city, municipality) name was added or changed. |
|
Alternate to Base Change |
US Only. The address was found to be an alternate record and changed to the base (preferred) version. |
|
Alias Name Change |
US Only. An alias is a common abbreviation for a long street name, such as “MLK Blvd” for “Martin Luther King Blvd.” This change code indicates that the full street name (preferred) has been substituted for the alias. |
|
Address1/Address2 Swap |
Address1 was swapped with Address2 because Address1 could not be verified and Address2 could be verified. |
|
Address1 & Company Swapped |
Address1 was swapped with Company because only Company had a valid address. |
|
Plus4 Change |
US Only. A non-empty plus4 was changed. |
|
Dependent Locality Change |
The dependent locality (urbanization) was changed. |
|
Thoroughfare Name Change |
The thoroughfare (street) name was added or changed due to a spelling correction. |
|
Thoroughfare Type Change |
The thoroughfare (street) leading or trailing type was added or changed, such as from “St” to “Rd.” |
|
Thoroughfare Directional Change |
The thoroughfare (street) pre-directional or post-directional was added or changed, such as from “N” to “NW.” |
|
Sub Premise Type Change |
The sub premise (suite) type was added or changed, such as from “STE” to “APT.” |
|
Sub Premise Number Change |
The sub premise (suite) unit number was added or changed. |
Product Codes#
For details of all product codes please visit here.
Address Object Initialize Return Codes (AOIR)#
Code |
Description |
---|---|
|
No error - initialization was successful. |
|
Could not open the mdAddr.dat file. |
|
Could not open the mdAddr.nat or mdAddr.str file. |
|
The internal database date of the mdAddr.dat and mdAddr.nat files do not match. |
|
Not all the memory buffers could be initialized. |
|
Unknown error. |
Address Type Canada (ATCA)#
Code |
Description |
---|---|
|
Street |
|
Street Served by Route and GD |
|
Lock Box |
|
Route Service |
|
General Delivery |
|
LVR Street |
|
Government Street |
|
LVR Lock Box |
|
Government Lock Box |
|
Building |
|
LVR General Delivery |
Address Type US (ATUS)#
Code |
Description |
---|---|
|
Alias |
|
General Delivery |
|
Firm or Company |
|
Highrise or Business Complex |
|
PO Box |
|
Rural Route |
|
Street or Residential |
Carrier Route Type (CRT)#
Code |
Description |
---|---|
|
PO Box |
|
City Delivery |
|
General Delivery |
|
Highway Contract |
|
Rural Route |
DPV Type (DPVT)#
Code |
Description |
---|---|
|
Input address matched to the Zip+4 file. |
|
Input address not matched to the Zip+4 file. |
|
Input address matched to DPV (all components). |
|
Input address primary number (street number) matched to DPV but secondary number not matched. |
|
Input address primary number matched, secondary number not matched; secondary number required. |
|
Input address primary number matched to DPV but secondary number missing. |
|
Input address primary number missing. |
|
Input address primary number invalid. |
|
Identified PO Box Street Address. |
|
Input address PO, RR or HC box number missing. |
|
Input address PO, RR or HC box number invalid. |
|
Input address matched to CMRA. |
|
Input address matched to CMRA but secondary number not present. |
|
Address was coded to a military address. |
|
Address was coded to a General Delivery address. |
|
Addresses that are assigned to a phantom route of R777 or R779. |
|
Input address primary number matched by dropping trailing alpha. |
|
Address was coded to a unique Zip Code. |
Postal Code Type (POCT)#
Code |
Description |
---|---|
|
Regular postal code |
|
Military Postal Code |
|
PO Box Postal Code |
|
Unique Postal Code usually assigned to a large organization or government institution. |
RBDI Address Type (RBDI)#
Code |
Description |
---|---|
|
Residential |
|
Business |
|
Unknown |
Time Zone Type (TZ)#
Code |
Description |
---|---|
|
Military |
|
Atlantic Time |
|
Eastern Time |
|
Central Time |
|
Mountain Time |
|
Pacific Time |
|
Alaska time |
|
Hawaii Time |
|
Samoa Time |
|
Marshall Island Time |
|
Guam Time |
|
Palau Time |