This is the online manual of GRCTools, personal name and address management software.  Click here for details.




Postal codes / Postal codes (incl. format) - locate

GRCTools manual | Index

image Only run this process and Postal codes - write located in the same session of GRC ToolsTM if you are confident that GRC ToolsTM has made no errors in identifying postal codes strings within your data file. Checking the intermediate file first is always advisable.

Purpose: to search for postal codes in user-defined fields. The process Postal codes - locate searches for postal codes that are correctly formatted, whilst Postal codes (incl. format) - locate searches also for postal codes that may be incorrectly formatted (where a postal code would normally contain a space or a hyphen). Thus, the former process for The United Kingdom will locate the postal code TW1 1AA, whilst the latter will locate TW1 1AA and TW11AA.

image Exporting from some formats (e.g. Excel) may cause data to be centred within fields. As these processes check data from the left of the field, all fields are left-aligned before processing. Credits are charged for left-aligning the data even if no postal code is found, as GRCToolsTM registers that the field after processing is different from the field before processing. To prevent this, assure that data is left-aligned in fields before processing.

Where a postal code is preceded by a postal country code (e.g. CH-1726) then the postal country code is also parsed with the postal code. This country code can be stripped from the postal code using the process Remove postal code country code. Postal codes followed by certain punctuation marks are also recognised and parsed.

Information required: You are required to specify the field in your database containing its unique identification code, or check the Check to use RECORD NUMBERS instead of ID box to store the record number to the file created instead of an ID.


For the United Kingdom only, you have the option of allowing abbreviated forms of postal codes. Especially in London, addresses are often given with only the outward (first section) of the postal code, e.g. SW1 instead of SW1 2AB. Though these postal codes are technically incomplete, this option allows you to search also for these abbreviated postal codes.


A file called MddmmyyX.DBF, where ddmmyy is the date and X is an incremented letter is created. GRC ToolsTMwill tell you at the top right of the screen the name of the file created for this session.


image If you should do more than 26 runs in a single day and have thus created files ending in all letters between A and Z, A is reused for all remaining sessions for that date.

image The MddmmyyX.DBF file is created in Visual Foxpro format. To view this file you will need Visual Foxpro or a program which can import Visual Foxpro files.

The MddmmyyX file created will contain the unique identification code of the record (or the record number if you so choose by checking the “Check to use Record Numbers instead of ID” box), the country code, the name of the field which was checked, the original field contents, the postal code (if GRC ToolsTMhas identified one), a message and a position. For each record in the user-defined database a corresponding record is created in theMddmmyyX file containing one of four messages:

   Postal code identified
   No Postal code Found
   Search Field is Empty
   Lookup Table not Found
id coun field_name field_cont pc message posn
1 FRA TOWN 75000 PARIS 75000 Postal code Identified 1
2 FRA TOWN PARIS   No Postal code Found  
3 FRA TOWN     Search Field is Empty  
... ... ... ... ... ... ...
17 FRA TOWN 03001 RENNES 03001 Postal code Identified 1
... ... ... ... ... ... ...
23 AFG TOWN KABUL   Lookup Table Not Found ...
56 UK COUNTY OXON, OX9 6RY OX9 6RY Postal code Identified 7
93 ICE TOWN 235 Reykjavik 235 Postal code Identified 1
... ... ... ... ... ... ...

If GRC ToolsTM thinks it has found a postal code, it will fill the pc field and the posn field. If you would like GRC ToolsTM to assign the postal codes found to a new field using the Postal codes - write located option, you need to check this file and to delete those records where a postal code has been incorrectly identified.

image If upon checking the MddmmyyX file you locate a postal code not found by GRCToolsTM, you need only add the postal code to the pc field and the position of the start of the postal code to the posn field. Do not change the field_cont data or add a message.