Support 805.461.7300
Sales
Our Technology. Your Success.
Tech Notes

Mark Invalid ZIP Code Records in a script

Use this command to mark Invalid ZIP Codes in your database. This makes it so you can identify Invalid ZIP Codes in a script, as you won't have to pull down Select to Show > Invalid ZIP Codes.

com_alias=alias()
USE IN IIF(USED('USZIP'),SELECT('USZIP'),0) 
SET SAFETY OFF
USE (ADDBS(XDEFFLDR)+"DMM\_USZIPS.DBF") IN 0 ALIAS  uszip
SELECT("uszip")
INDEX ON LEFT(zip,5) TAG mytag
SELECT(com_alias)
replace all X with ""
replace X with "X" for !SEEK(LEFT(zip,5),"uszip")
USE IN IIF(USED('_USZIP'),SELECT('_USZIP'),0)

In the Script, you can add this command event after the Validate Records event.

When you export your data or when you show Marked records, look for a capital X in the x field. These will be your Invalid ZIP Code records.

« Back to Tech Notes

You are a genius and I have no excuse for not thinking of this before calling. Our customer is good with cutting the tops and bottoms for the booklets to get under 16 ounces. Thank you for getting me out of a jam and thank you even more for offering your help with this project! I decided to switch to AccuZIP after speaking with Steve at the Minuteman Show. I was impressed with his idea of customer service and you have totally proven him right.
M.M., Petaluma, CA