You can use this approach to reduce the size of the candidate set.
Use
KEY-DATA
to append redundant information from the Data record to the key generated from
KEY-FIELD
. It is stored in the index. The additional information appended to the key is passed to a Score-Logic routine, which can then decide whether or not this particular record should be included in the candidate set.
Up to five fields from the Data record can be appended to the key. Refer to the
IDX-Definition’s KEY-DATA
parameter for the syntax.
A Score-Logic routine, which examines the
KEY-DATA
from the search and file records, can be provided in one of these forms:
a standard SSA-NAME3 matching logic enabled using
KEY-PRE-SCORE-LOGIC=
a standard SSA-NAME3 matching logic enabled using
KEY-SCORE-LOGIC=
See also the
FULL-KEY-DATA
under
IDX-Definition’s | OPTIONS=
section.
Scoring with KEY-DATA can be much more efficient than scoring with data from the Data Record (as used by Pre-Score-Logic and Score-Logic).
Key-Pre-Score-Logic / Key-Score-Logic
The SSA-NAME3 matching logic is nominated using the Clustering-Definition’s
KEY-PRE-SCORE-LOGIC
or
KEY-SCORE-LOGIC
keywords.
The matching routine is called with the search and file records
KEY-DATA
fields. If the returned score is less than the limit defined for the scoring logic, the file record is rejected from the candidate set.
For example, to append the first two bytes of a postal-code field to the key and then score it using a SSA-NAME3 matching scheme, perform the following tasks: