Introduction to SSA-NAME3 (EXTN) Service Groups

Introduction to SSA-NAME3 (EXTN) Service Groups

How to Use SSA-NAME3 Matching to Make the Choice Easier?

How to Use SSA-NAME3 Matching to Make the Choice Easier?

If your database contains a large number of records, and the search name was for example,
John Smith
or some very common name in your population, the number of records and screens to be displayed could be significant. In this case, simply showing the other identifying data on the screen is not enough to make the choice easy for the user because the correct record could be on the last screen.
This is where SSA-NAME3 Matching comes in. If the user also enters some of the other identifying data as part of his/her search criteria, this data, along with the name, can be used to get a ’Score’ for each candidate record found in the search. This Score is a value between 1 and 100 and can be used in a number of ways:
  • When each candidate record is retrieved you can pass it to SSA-NAME3 for Matching and use the Score to
    ELIMINATE
    the candidate from the list to be displayed.
  • After all of the candidate records have been read and matched, you can sort the candidate list in descending order by the Score before they are displayed. This way, the most likely candidates will appear at the top of the first screen.
For example, if your search criteria was:
Name: Mary Evans Jones Address: 1445 East Putnam Avenue
Using Matching, the search results could be returned in the following order:
Name Address Cust Id M E Jones 1445 E. Putnam Ave. 2176 Mary Jones 14 Peter Street 1236 M. Evans 107 Putnam Drive 3737
The following updated pseudo code shows how Matching fits into the Search program:
GET CUST-SEARCH-NAME,SEARCH-ADDRESS FROM SCREEN; MOVE CUST-SEARCH-NAME TO SSA-NAME3-NAME-IN; MOVE ’POSSRCH’ TO SSA-NAME3-FUNCTION; CALL SSA-NAME3 USING SSA-NAME3-FUNCTION, SSA-NAME3-NAME-IN; MOVE CUST-SEARCH-NAME TO SEARCH-RECORD.NAME; MOVE CUST-SEARCH-ADDRESS TO SEARCH-RECORD.ADDRESS; MOVE ’SCH01’ TO SSA-NAME3-MATCH-SCHEME; FIND SSA-NAME3-KEY-FILE.SSA-NAME3-KEY >= START-SEARCH-KEY DO WHILE (SSA-NAME3-KEY-FILE.SSA-NAME3-KEY <= END-SEARCH-KEY); MOVE SSA-NAME3-KEY-FILE.CUST-NAME TO FILE-RECORD.NAME; MOVE SSA-NAME3-KEY-FILE.ADDRESS TO FILE-RECORD.ADDRESS; CALL SSA-NAME3 USING SSA-NAME3-MATCH-SCHEME, SSA-NAME3-SEARCH-RECORD, SSA-NAME3-FILE-RECORD;
The above Call does not show the exact API requirements these are described in the
APPLICATION REFERENCE FOR SSA-NAME3 SERVICE GROUPS
manual.
IF SSA-NAME3-SCORE > ’050’ MOVE SSA-NAME3-KEY-FILE.CUST-NAME TO PROGRAM ARRAY; MOVE SSA-NAME3-KEY-FILE.CUST-ID TO PROGRAM ARRAY; MOVE SSA-NAME3-SCORE TO PROGRAM-ARRAY; END-IF READ NEXT SSA-NAME3-KEY-FILE RECORD; END DO; SORT PROGRAM ARRAY DESCENDING BY SSA-NAME3-SCORE; DISPLAY PROGRAM ARRAY TO SCREEN;

0 COMMENTS

We’d like to hear from you!