Determines if the USPS changed a ZIP + 4 address definition since GeoStan last processed the record.
Syntax
01 GSID PIC S9(9) BINARY.
01 PZIP PIC X(USER LEN).
01 PZIP4 PIC X(USER LEN).
01 PDATE PIX X(USER LEN).
01 GSFUNSTAT PIC S9(9) BINARY.
*
CALL "GSZ4CH" USING GSID, PZIP, PZIP4, PDATE, GSFUNSTAT.
Arguments
GSID ID returned by GSINITWP for the current instance of GeoStan. Input.
PZIP First five digits of the 9-digit ZIP Code to be tested. Input.
PZIP4 Last four digits of the 9-digit ZIP Code to be tested. Input.
PDATE Date of the GeoStan ZIP + 4 information file used to process the record. The string's format is MMYYYY (for example, 081998). Input.
GSFUNSTAT Return value for the procedure. Output.
Return Values
GS-ERROR Common reasons for GS-ERROR are:
n The GSL file was not loaded because it was not found in the path.
n The GSL file was not loaded because it was a different release level than the GSD file.
GS-Z4-CHANGE
GS-Z4-NO-CHANGE
Prerequisites
GSINITWP
Notes
For ZIP4CH to work, the GeoStan GSL file must be in a directory listed in the PGPATHS member of GSIINITSTRUCT when calling GSINITWP. The Z4Change file, which is generated by the USPS, contains a record for every ZIP + 4 in the country. Each record contains twelve flags that represent the last twelve months, starting with the current release date. Each of these flags has a value of either True or False, indicating if the ZIP + 4 changed for that monthly postal release. The GeoStan GSL file incorporates this information, which GSZ4Ch references.
Z4Change information is valuable to users who process very large address lists frequently. As you process each record, you can call GSZ4CH and quickly tell if the record needs reprocessing. This information can help you quickly identify only those records that need reprocessing.
Your application must store the date of the GeoStan GSL file used to process a record. GeoStan uses this date as the GSZ4CH PDATE input parameter. This is the same date printed on the GeoStan CD used for record processing, and is one month later that the release date of the USPS files used on the GeoStan CD.
Use the following code example if you are unsure of the release date. You should run this code when standardizing a batch of records and store the resulting date string as input to GSZ4CH in future processing runs.