User applications use SSA-NAME3 for three major purposes, Key Building, Building Search Strategies and Matching.
Key Building is the process of building keys for the name or address records to be searched. The user application calls the
function of SSA-NAME3, passing it a name or address and indicating which key field (
) it wishes to use. SSANAME3 passes back one or more keys ("Keys Array") which should be stored by the application in the user’s database. These keys are typically 8-byte character keys; however, a 5-byte binary option is also available. Applications making use of this service are commonly the initial key-load program, and the name or address online update or batch maintenance programs.
An example of the program flow in a key building program is shown below:
Building Search Strategies
The process of building a search strategy returns an array of search key ranges for a search name or address. The user’s search application calls the
function of SSA-NAME3, passing it the name or address and indicating which field and Search Strategy (Search Level) to use. SSANAME3 passes back an array of search key ranges that define the sets of records that are candidates for this name or address search. The user application then does a Select between start and end key or a key sequential access of its SSA-NAME3 key index for all of the key ranges returned. It then fetches the name or address and other data from the database to be used for matching.
The diagram below in the "Matching" section also shows the Search Strategy call.
Matching compares two records (a search record and a file record). After reading a candidate record in the search, the user application calls the
function of SSA-NAME3 indicating which Matching "Purpose" and "Level" to use. The user application also passes the search name or address and any other identity data entered, plus the file name or address and the identity data retrieved for the file record. SSA-NAME3 compares the two records and passes back a Score between 0 and 100 and a Match Decision (Accept, Reject or Undecided). The user application may then use the Score and/or the Decision to match, filter or rank the records.
An example of the program flow for the search and matching application: