USZIP (comparison function)

The USZIP comparison function checks for a match on United States ZIP code.

The comparison result can be either a complete match on all five digits, a partial match on the first three digits, or a complete mismatch. Sometimes the three matched uncommon digits can have more weight than five matched common digits.

Tip: Use ZIP along with the Address and Phone in a three-dimensional compare function (as mentioned earlier) when possible.
Number of roles
1
Number of dimensions
(in each role)
1
Weight table
mpi_wgtnval, mpi_wgthead
Other tables
mpi_cmpspec, mpi_cmphead, mpi_cmpfunc
  1. If the first three digits match exactly, then the fourth and fifth digits are checked for matching. If these digits also match exactly, the corresponding five-digit exact-match weight is taken from the mpi_wgtnval table.
  2. If the first three digits match exactly and the fourth and fifth digits do not match, the partial weight for the three digits is taken from the mpi_wgtnval table.
  3. If even the first three digits do not match, it is considered a mismatch and the disagreement weight is taken from the mpi_wgtnval table.

The following tables are expected for USZIP.

  • mpi_wgthead
    1|1|A|CMPID-ZIP-ZIP5|NVAL|CMPID-ZIP-ZIP5|0|0|0|0|
    1|1|A|CMPID-ZIP-ZIP3|NVAL|CMPID-ZIP-ZIP3|0|0|0|0|
    
  • mpi_wgtnval
    1|1|A|CMPID-ZIP-ZIP5|-1|429|
    1|1|A|CMPID-ZIP-ZIP5|-2|-234|
    1|1|A|CMPID-ZIP-ZIP3|-1|0|
    1|1|A|CMPID-ZIP-ZIP3|-2|-234|