Detailed instructions for use are in the User's Guide.
[. . . ] Match Library Programmer's Reference
Match Library 7. 80c September 2007
Contact information
Contact us on the Web at http://www. firstlogic. com/customer If you find any problem with this documentation, please report it to Business Objects in writing at documentation@businessobjects. com.
Copyright Patents
Copyright © 2007 Business Objects. Business Objects owns the following U. S. patents, which may cover products that are offered and sold by Business Objects: 5, 555, 403, 6, 247, 008 B1, 6, 578, 027 B2, 6, 490, 593 and 6, 289, 352. Business Objects, the Business Objects logo, Crystal Reports, and Crystal Enterprise are trademarks or registered trademarks of Business Objects SA or its affiliated companies in the United States and other countries. [. . . ] Instead, set options at the MTC_Option_Name and MTC_Option_Value parameters in the general configuration file. Returns MTC_OK if successful, MTC_INVID if the ID is not valid, or MTC_ERROR if an error occurred. Use mtc_get_error_info() to retrieve one of the following error numbers:
MTC_ERR_IGNORED -- ID in use by Match callback or Match/Consolidate
Returns
Library
MTC_ERR_INVOPTNO -- Invalid opt_num was input MTC_ERR_INVVAL -- Invalid opt_val was input Example
int status; MTC_AUTO_ID mtc_auto_id; /* set the hyphenated last name option on */ status = mtc_auto_set_option(mtc_auto_id, MTC_AUTO_MOPT_HYPHEN_LNAME, MTC_AUTO_HYPHEN_ON);
44
Match Library Programmer's Reference
Value for opt_num
Value for opt_val
Description and values for opt_val
MTC_AUTO_MOPT_AMBIG_LL MTC_AUTO_MOPT_AMBIG_ADDR MTC_AUTO_MOPT_AMBIG_FIRM MTC_AUTO_MOPT_AMBIG_NAME
MTC_AUTO_AMBIG_POOR
If one or both keys contains ambiguous or blank data for the last line, address line, firm, or name, respectively, then give the ambiguous field a poor blank-match score and continue to include the field in the matching process. If one or both keys contains ambiguous or blank data for the last line, address line, firm, or name, respectively, then give the field a loose blank-match score and continue to include the field in the matching process. If one or both keys contains ambiguous or blank data for the last line, address line, firm, or name, respectively, then the records are not duplicates. Let the Match Library determine how to handle ambiguous fields. For multiple names such as "John and Mary Smith, " only one name needs to match--for example, "John and Sue Smith" would match. For multiple names such as "John and Mary Smith, " all names must match. Let the Match Library determine how to handle multiple names. Controls the field count settings for the name fields when mtc_auto_set_keyattr() is called. For example, if this value is set to 2, then mtc_auto_set_keyattr() will set up name fields for two people. When one last name is hyphenated and the other is not, only one name needs to match. For example, "Jones" matches "Jones-Smith. " Do not give special treatment to hyphenated last names. Let the Match Library determine how to handle hyphenated last names.
MTC_AUTO_AMBIG_LOOSE
MTC_AMBIG_NOMATCH
MTC_AUTO_AMBIG_AUTO MTC_AUTO_MOPT_MULTINAME MTC_AUTO_ MULTINAME_MATCHONE
MTC_AUTO_ MULTINAME_MATCHALL MTC_AUTO_ MULTINAME_AUTO MTC_AUTO_MOPT_NUMPEOPLE 1 to MTC_KEY_MAXFLDTOTALCOUNT
MTC_AUTO_MOPT_ HYPHEN_LNAME
MTC_AUTO_HYPHEN_ON
MTC_AUTO_HYPHEN_OFF MTC_AUTO_HYPHEN_AUTO
Chapter 3: Match Library functions
45
Value for opt_num
Value for opt_val
Description and values for opt_val
MTC_AUTO_MOPT_ MAIDEN_NAME
MTC_AUTO_MAIDEN_ON
For women's names, the last name comparison should not cause the overall name comparison to fail. For example, "Mary Smith" could match "Mary Jones. " Do not give special treatment to women's names. Let the Match Library determine how to handle women's names. When personal names match better than firms--for example, "Mary P. Foley, IBM Corp. " and "Mary P. Foley, AS/400 Division"--ignore the firm data. Let the Match Library determine whether or not to ignore firms. When the secondary range, address, or firm comparison is ambiguous, perform an extra comparison on name. When the secondary range, address, or firm comparison is ambiguous, perform an extra comparison on last name. [. . . ] If the error MTC_ERR_INVPATH_GMTC is received, ensure that this file is present in the "path" argument passed to this function.
Example
MTC_RULE_ID ruleid; MTC_KEYPAIR_ID keypairid; MTC_GMATCHER_ID matcher_id; char* mypath = ". /" int retval; /* create a Japanese matcher */ retval = mtccb_create_matcher(MATCHER_JP, &matcher_id, mypath, ruleid, keypairid);
Appendix C: Global Match functions
113
mtccb_compare_firm
Synopsis
#include <mtccb_funcs. h> int mtccb_compare_firm(comparefunctdata, str1, len1, str2, len2, score); void*; comparefunctdata; Input: Compare function data FlUChar* str1; Input: First string to compare int len1; Input: Length of the first string to compare FlUChar* str2; Input: Second string to compare int len2; Input: Length of the second string to compare int* score; Output: Score of the comparison
Description
This is a call back function provided with the library to compare firm data. You can set this function as a call back in mtc_rule_set_keyfld_exit_ comparefld_u. In that case, the value of compare_func_data_u must be of type MtccbFieldData as specified in mtccb_funcs. h. See the sample file gmsample. c for example usage of this function. [. . . ]