The steps to call AddrScan with a user-written driver are:
- Define a local CALLAREA structure.
- Initialize the entire CALLAREA structure to blanks except for pAddrAnch (ADDRPASS-ANCHOR) which should be HIGH-VALUES.
- Set any members of the CALLAREA structure that you want to remain the same from call to call (for example, the maximum length of the standardized address lines).
- Initialize the input address lines of the CALLAREA structure to blanks (also do this before each subsequent call to AddrScan).
- Move the data from your input record to the appropriate members within the CALLAREA structure.
- Call the AddrScan function, passing the address of the CALLAREA structure.
- Perform any custom processing using the returned address lines, returned city/state line, and returned ZIP Code field within the CALLAREA structure.
- After AddrScan processing, set pAddrOpts (ADDRPASS-OPTIONS) to HIGH-VALUES to terminate AddrScan and make one last call.