Melissa Data Home PageCall 1-800-MELISSA for Data Quality Solutions
Shopping Cart Buy | Newsletters | Search
Products Solutions Downloads Support Resources Lookups Contact Us


 


 

MatchUp API Frequently Asked Questions

1. MatchUp Content
   1.1 MatchUp Basics
       1.1.1 What is the MatchUp API?
       1.1.2 What is a Matchcode?
       1.1.3 What is a Matchcode Key?
       1.1.4 Can I create my own Matchcodes, or edit existing ones?
       1.1.5 What if my source tables don’t have the same data types                MatchUp uses to match?
       1.1.6 Do I have any control over how MatchUp matches my file?
       1.1.7 What's a Lookup Table?

2. Technical Content
   2.1 Installation
       2.1.1 How Do I locate the path to MatchUp API?
       2.1.2 How do I make sure that MatchUp API is calling the correct                DLL?
       2.1.3 Why I am having difficulties with Visual Basic trying to locate                MatchUp DLLs?
       2.1.4 Can I cut and paste the activation code from Windows into the                AP or the opposite?

   2.2 Debugging
       2.2.1 How do I turn on the debugging log information?
       2.2.2 How do I get Debug View Program to view the log?

   2.3 SQL Server Usage
       2.3.1 What Dll files should be copied to SQL server?
       2.3.2 How do I add the extended stored Procedures to SQL Server?
       2.3.3 How do I add the user defined functions to SQL Server?
       2.3.4 Does the regular Demo of MatchUp API works on SQL Server?
       2.3.5 Why 32-bit extended stored procedures will not work with SQL                Server 2000 (64-bit)

   2.4 Matching Issues
       2.4.1 Why do I get unhandled exception error?
       2.4.2 Why do I get Incorrect Matchcode Mapping error?
       2.4.3 Why do I get Addresses patterns that are not getting parsed                correctly?
       2.4.4 What does inferred matching error mean?
       2.4.5 Why do I run into matchkey storage issues?

    2.5 Functions
       2.5.1 What is build key?
       2.5.2 How do I make sure that Visual Basic or Visual FoxPro is not                manipulating or storing the output key?
       2.5.3 What does “Out of memory /the program is crashing the server”                error mean?
       2.5.4 Why Matchcode Component Data Types are incorrectly defined                in the header files?
       2.5.5 Why can’t I run the sample code examples?

   2.6 Sharing
       2.6.1 How do I specify the location of shared lookup tables for multiple                users?
       2.6.2 Will I be able to point to a shared matchcode file?

       2.7 Results
       2.7.1 How can I determine which record in a group will be tagged as                the Output record?
       2.7.2 Why is the API taking too long to process?
       2.7.3 Why did my process crash?
       2.7.4 Why did MatchUp not catch some duplicates?
       2.7.5 I got way too many duplicates!
       2.7.6 How can I tell which source file contributed to my Output table?
       2.7.7 Can I verify the results?
       2.7.8 What reporting is available?

       2.8 General
       2.8.1 What type of hardware do I need?
       2.8.2 Are their any different versions? Like a standalone windows                interface?
       2.8.3 How many users can use my license?
       2.8.4 What type of support do you offer?
       2.8.5 Can I process dual name fields?
       2.8.6 Can I assign a confidence percent to select Duplicates?
       2.8.7 Does it process International Data?

FAQs

 

1. MatchUp Content

1.1 MatchUp Basics

1.1.1 What is the MatchUp API?

The MatchUp API is a professional programming library used to match database records. Typical uses of the MatchUp API are:

- Real-time lookup of customer information during data-entry.
- Processing files with custom file structures (i.e., files that    cannot be exported into a format that the Double Take GUI    version could use).
- Providing deduplication for a custom-written application    seamlessly (i.e., without shelling to another application).
- Parsing of street addresses in a custom-written application.
- Providing custom functionality that cannot be achieved with    Double Take 3.

It can match files with different structures, different field names, different field types, and different field lengths. You can process multiple matchcodes in a single pass, each of which can be made of any part(s) of any field(s) you designate

1.1.2 What is a Matchcode?

< A Matchcode is a set of rules which allow you to determine if two records should be considered duplicates. MatchUp uses a predefined Matchcode, or one you have created using the Matchcode editor, to create a matchkey for each record.

1.1.3 What is a Matchcode Key?

A string of data, determined by your matchcode, extracted from each record and is used to compare records when deduping.

1.1.4 Can I create my own Matchcodes, or edit existing           ones?

Yes, Using MatchUp's Matchcode Editor, you can create your own matching criteria (your own Matchcode), or copy and edit one of the basic matchcodes shipped with MatchUp, to determine whether two records should match. This tool lets you match on anything! The Matchcode Editor can be accessed from the MatchUp API folder – running Matchcode Editor.exe. It can also be accessed by creating a shortcut with the Matchcode Editor path and the location of the programs Matchcode database, Dtake.mc as a parameter on the command line. i.e.…
“C:\MatchUpAPI\Matchcode Editor.exe”
“C:\MatchUpAPI\Dtake.mc”

1.1.5 What if my source tables don’t have the same data            MatchUp uses to match?

For known datatypes, most types of data you would use to match on with a merge purge application, all you have to do is tell MatchUp what type of data is in a field and the format of that data. MatchUp will extract the relevant data needed to build the matchccode keys. In the example function call below, the developer has specified that the source data mapped to component number two contains Full Names, even though his matchcode in another function call states he is matching on last name. MatchUp extracts the last name out of the full name data to build the key.
DTMap Component Ex (hDeduper, 2, MP_FULL);

1.1.6 Do I have any control over how MatchUp matches my            file?

In addition to the Matchcode Editor - where you determine the match rules, you also have complete control of the Lookup Tables – lists of key words are associated with different datatypes.

1.1.7 What's a Lookup Table?

These program files are lists of known keywords associated with a specific data type. They help MatchUp to process different data types using advanced methods, because it recognizes keywords and knows how they can be treated. The user may edit or append these lists to help MatchUp decide how to more accurately process your data. Occasionally, we have a customer who always processes a database specific to an industry or geographic area where proprietary keywords are not in the table, or have a different meaning. Caution: When you edit these tables you may be overwriting years of programming experience on how to best handle these common data types.

2. Technical Content

2.1 Installation

2.1.1 How Do I locate the path to MatchUp API?

If you get the Windows message "The dynamic link library DtApi.Dll could not be found...", then you will have to modify your path to include the location of the API.

Windows NT, Windows 2000, Windows XP:
Go to the Control Panel, double-click System, then click the Advanced tab. Click the Environment Variables button. In System Variables, locate the "Path" variable. Click the Edit button. At the end of the existing value, add:

;c:\DTApi

Where c:\DtApi is where you have installed the MatchUp API. Note that the first character is a semicolon, not a colon. Once you've made this addition, click OK until you're back to the Control Panel.

Note that the API uses two DLLs: dt3api.dll and psortmi.dll. If either Dlls cannot be found, Windows will report that it cannot locate dtapi.dll (Windows will never explicitly state that it can’t find psortmi.dll even if this is the case).

If your program crashes on one of the Init functions, ensure that psortmi.dll is in the same folder as the dt3api.dll.

2.1.2 How do I make sure that MatchUp API is calling the            correct DLL?

Many of the newer DLLs have the same name as the earlier version, and it is easy to get them confused. It is a good idea to perform a file search on the machine to ensure that the old version's DLL's are no longer present (or are in a location that won't be found when Windows looks for the DLLs).

Often it’s easiest to eliminate all but a single copy of the Dlls to ensure that your program is calling the correct one.

Also, the API will always send a message to DebugView when the DLL is first loaded (“loading Dt3Api: C:\DtApi\Dt3Api.dll”) so that you can confirm that the correct Dll is being loaded

2.1.3 Why I am having difficulties with Visual Basic            trying to locate MatchUp DLLs?

One particularly bothersome problem with Visual Basic is that it has difficulty locating DLLs. In most compiled languages, the first place that Windows will look for a called DLL is the folder where the compiled .exe is located. So most people will install the MatchUp DLLs in the same folder as their executable and never have a problem. Visual Basic seems to use some other logic. You have a few ways to solve this problem:

1. Change the shortcut (to Visual Basic) so that the Start in folder points to where your code (and/or the DLLs) is located. If you aren't running from a shortcut (or a 'generic' Visual Basic shortcut), create a new one and use it to launch your program.

2. Change the Declare Function commands to specify the explicit location of the DLL. For Example:

Declare Function BDTRegister Lib "c:\DtApi\Dt3Api" (ByVal Str As String) As Integer

3. Add the DLLs' folder to the PATH environment variable.
4. Move the DLLs into the Windows folder.
5. Move the DLLs into the Windows System folder.

2.1.4 Can I cut and paste the activation code from            Windows into the AP or the opposite?

The MatchUp activation codes for the Windows version and the API are NOT compatable. Do not try to cut and paste a windows activation string into the API or visa versa.

2.2 Debugging

2.2.1 How do I turn on the debugging log information?

The MatchUp API can output special debugging log information which you can use to troubleshoot problems. Because this debugging information takes a little bit of time to generate, the API functions do not generate this information by default. However, each language provides a way to turn on this logging:

1.in some languages (SQL Server, Java), this is done through a function call such as DTDebugMessages.

2. In most other languages, an alternate function is provided. For example, DTRegister is the non-degug function, DbgDTRegister is the debug function.

More specific information can be found in the electronic documentation under Concepts: Debugging Once you have turned on the debugging information, you can view it using a program called DebugBiew (see next section).

2.2.2 How do I get Debug View Program to view the log?

The Debug View program is available as a free download from Microsoft (http://www.microsoft.com/technet/sysinternals) We won’t go into the details of how to use the program as it is very simple to use.

If you find that no debug messages are appearing in DebugBiew, ensure that no other program is intercepting the messages. For example, the Visual C++ IDE captures debug messages, and you will usually see them in the IDE’s Debug Window. There’s nothing wrong with using the IDE’s Debug window instead

2.3 SQL Server Usage

2.3.1 What Dll files should be copied to SQL server?

Two DLL files must be copied into the /Binn directory in your SQL Server installation. You will find them in your MatchUp API installation folder:

PSortMi.Dll Dt3Api.Dll

If you have already loaded the extended stored procedures into SQL Server, you MUST stop SQL Server before copying these dlls. Even though Windows will happily report that you have updated the DLLs in the binn folder, they WILL NOT update unless SQL Server is not running. People usually fall into this trap when they are updating an older version of the DLL to a newer one.

2.3.2 How do I add the extended stored Procedures to SQL           Server?

Before you can use the API with SQL Server, you must have followed the additional installation steps shown here…

A. Open SQL Server Enterprise Manager.

B. Expand the Microsoft SQL Servers group.

C. Expand the SQL Server Group underneath it.

D. Expand the desired server.

E. Select Tools | SQL Server Query Analyzer.

F. Ensure that the DB: (upper right combo-box) is "master". If     it's not, change it to "master".

G. Select File | Open.

H. Open the SQL script Add DT API Extended Procedures.sql, which will be in the SQL Server folder in the location where you've installed the API.

Carefully take note of the comments regarding the re-naming of the dll and the path

I. If you wish, you can modify the lines that start: grant executes on... to allow execution rights to certain users or groups (other than "public").

J. Press F5 or click the green execute arrow to execute the    query.

2.3.3 How do I add the user defined functions to SQL           Server?

If you're using SQL Server 2000, you can add the User Defined Functions (UDFs) which make using the API a lot easier:

A. Open SQL Server Enterprise Manager.

B. Expand the Microsoft SQL Servers group.

C. Expand the SQL Server Group underneath it.

D. Expand the group of the desired server.

E. Select Tools | SQL Server Query Analyzer.

F. Ensure that the DB: (upper right combo-box) is "master". If     it's not, change it to "master".

G. Select File | Open.

H. Open SQL script Add DT API Functions.sql, which will be in     the SQL Server folder where you've installed the API.

K. Press F5 or click the green execute arrow to execute the     query.

2.3.4 Does the regular Demo of MatchUp API works on SQL           Server?

The "regular" demo version of the API has splash screens that appear from time to time. SQL Server doesn't like GUI interaction, so we can't use these screens. Instead, we can give you an expiring registration key that will let you try the full product for a few weeks. Contact us at sales@melissadata.com

2.3.5 Why 32-bit extended stored procedures will not work           with SQL Server 2000 (64-bit)?

http://support.microsoft.com/kb/813953
...For databases that are migrating from SQL Server 2000 32-bit to SQL Server 2000 64-bit, the 32-bit extended stored procedures will not work with SQL Server 2000 (64-bit). The Microsoft Windows on Windows 64 (WOW) environment in 64-bit Microsoft Windows will not run 32-bit SQL Server extended stored procedures (.dlls). The 32-bit extended stored procedures must be recompiled with a 64-bit compiler to obtain the 64-bit .dlls.

http://msdn2.microsoft.com/en-us/library/ms241064.aspx ...Due to the design of x86 emulation and the WOW64 subsystem for the Itanium processor family, applications are restricted to execution on one processor.

64 bit version will be released in the future.

2.4 Matching Issues

2.4.1 Why do I get unhandled exception error?

Creating a new matchcode in the GUI interface, then calling that matchcode with the Init function, but misspelling the matchcode will cause an unhandled exception. The matchcode string passed to the Init function must be spelled exactly as listed in the matchcode editor.

2.4.2 Why do I get Incorrect Matchcode Mapping error?

Getting this error could mean you did not sequence the components in a linear order when calling the MapComponent function, or you have coded a data type ( numeric value or DEFINE ) of a component type which is incompatable with the matchcode you are using.

There are two easy ways to determine how to sequence your MapComponent calls:

1 Use the MatchUp GUI’s “Matchcode Mapping” setup tab.

2 Call DTGetMap ComponentType() and/or    DTGetMapComponentLabel() to determine what the API is    expecting.

These methods are discussed in detail in the electronic help file under Concepts: Matchcodes: Matchcode Mappking.

2.4.3 Why do I get Addresses patterns that are not getting            parsed correctly?

The MatchUp street splitter used to match inexact addresses, ie keyed in differently, relies on known address key words and patterns using these words. Some words are problematic, as they can represent a street name, po box, directional and a highway! This makes recognizing patterns difficult, potentially causing records to be missed as duplicates. A few examples…

6547 Box Elder Loop
821 Sixty Six Rd
431 Shelbourne Four Corners

If you find records whose addresses whose keys are not getting built correctly, ie addresses are not getting parsed correctly, let us know, we’re sure there are still some obscure patterns out there.

2.4.4 Why do I run into matchkey storage issues?

Take the following 3 records as example. A)12 Main B) PO Box 44 and C) 12 Main PO Box44. A matches C, and C matches B, so therefore A matches B. The windows version and the Read Write API method catch these by inferred matching. But the incremental and Hybrid methods are a different story. Say Record A arrives on Monday and Record B on Tuesday (Record C hasn't arrived yet). Record A would not match Record B, they're just not alike, and so they both get added to the historical database. Record C arrives on Wednesday. The API reports that Record C matches Record A and Record B, but it can't do anything about the mistake that was made on Tuesday. And, of course, on Tuesday, there was no way of seeing the arrival of Record C on Wednesday.

2.4.5 Why do I run into matchkey storage issues?

If you have one dedupe handle ( one merge purge session ) storing keys and adding records, and another developer or end user writes to the key file using a different matchcode, you will have, in short, changed the matching rules midstream, regardless of how briefly or long ago it was done. Take great care in naming your .key files and only synching with the proper matchcode.

2.5 Functions

2.5.1 What is build key?

OutKey - String that receive generated matchcode. Be sure that this string will be large enough (MAX_DT characters) to receive the resultant key.

BuildKeyEx:
The data array specified in the Fieldn parameters should match in both data type and count to the mappings specified in the DTMapComponent calls performed prior to DTBuildKey.

2.5.2 How do I make sure that Visual Basic or Visual           FoxPro is not manipulating or storing the output key?

BuildKey:
If your Visual Basic or Visual FoxPro program is manipulating or storing the output key, the trailing NULL character should be removed. If you are only passing this string to DTMatchRecord or DTAddRecord, this is not necessary, however.

2.5.3 What does “Out of memory / the program is crashing            the server” error mean?           

Many times this is caused by a failure to call the DTClose( ) function for each handle.

2.5.4 Why the Matchcode Component Data Types are            incorrectly defined in the header files?           

The Matchcode Component Data Type defines in some of the header files are incorrect (each is off by one – the array should start with 0x01). Incorrectly defined will cause the wrong component to be printed out. These are the correct defines:

#define MC_PREFIX       0x01        // Name's prefix
#define MC_FIRST        0x02        // Name's first name
#define MC_MIDDLE      0x03       // Name's middle name
#define MC_LAST         0x04       // Name's last name
#define MC_SUFFIX      0x05       // Name's suffix
#define MC_GENDER     0x06       // Sex of a name
#define MC_NFIRST      0x07       // First name's nickname
#define MC_NMIDDLE    0x08       // Middle name's nickname
#define MC_TITLE        0x09       // Title and/or department
#define MC_COMP        0x0a        // Company

2.5.5 Why can’t I run the sample code examples?           

Try commenting out the DTAPI code altogether, running the debug version, or single step through the code. You may be surprised that you don’t have the most recent data access engines some of our examples use.

2.6 Sharing

2.6.1 How do I specify the location of shared lookup tables           for multiple users?           

You may use the set of SETLOC () functions to specify the location of shared lookup tables enabling multiple users to run the API from different locations , yet process with the same accuracy.

The SetLoc() functions will always take precedence over the int() parameters. If you SetFileLocCompany(“C:\Special\”_ but call initialize with a different location, “C:\Special” will be used for the company table, the location specified in the initialize will be used for the other table.

2.6.2 Will I be able to point to a shared matchcode file?           

Can I use the same matchcodes as the GUI version? Yes, if the version numbers are synched, there is a SETfileLocDtake.mc function that allows you to point to a shared matchcode file.

Be sure that users aren’t allowed to freely modify matchcodes that the API uses. Even the simplest change could make your code work incorrectly, as adding, removing or resequencing a matchcode component will probably alter the matchcode mappings and consequently your DtMapComponent() calls will no longer be correct.

2.7 Results

2.7.1 How can I determine which record in a group will be           tagged as the Output record?           

Unlike the windows version of MatchUp, which lets you pre-determine a priority between matching records in a number of ways, the developer must use data returned from the deduping functions – original source, record number, dupe group, and output status to programmatically handle the output and duplicate records.

2.7.2 Why is the API taking too long to process?                    

Merge Purge is a memory intensive, complex process. But you can help speed up the process by keeping data local, designing and using a matchcode which takes advantage of MatchUp’s group clustering, and most importantly, developing your application with the most efficient file handling, data strorage, and read and write access methods.

2.7.3 Why did my process crash?                    

A program crash could be anything from a corrupt data source, a read-only file you are attempting to write to, a network connection drop out, operating system error, user error, or once in a blue moon – a bug in the program. One of the advantages of the API is that you have more control over debugging, and adding error handling and trapping into your code.

2.7.4 Why did MatchUp not catch some duplicates?                    

MatchUp can only use the match rules and settings which the end user has provided, so verify the matchkeys got built correctly. If this wasn’t the source of your problem, check to see if your matchcode rules were satisfied – the keys may be the same, but your may not have met the conditions of any matchcode column. Because the API also allows for real time comparison, inferred matching can not always be taken advantage of. In other words, the sequence of linking records is more critical with the API.

2.7.5 I got way too many duplicates!                    

Most likely, your matchcode rules were too loose; possibly one column of your matchcode was a subset of a valid column. Another source of too many duplicates may be that you mapped in the wrong datatype in DTMapComponent function, or supply the incorrect source data in the DTBuildKey function. If you are using a Last Name as part of your match, but you accidentally mapped in a Full Name field and datatype, you will get too many duplicates.

2.7.6 How can I tell which source file contributed to my           Output table?                    

The original data Source, in addition to the Key, Record Number, Group Number, Output Status, and Group Count parameters are populated with information when the DTReadRecord is called,

2.7.7 Can I verify the results?                    

Depending on the method you choose to dedupe, you can use the returned DTCompare, DTReadRecord, DTMatchresults to help you decide how to write the particular record to Output.

2.7.8 What reporting is available?                    

Since you do the file handling’ you are also responsible for coding and counting methods for inter, intra file counts, output totals, dupe counts, etc.

2.8 General

2.8.1 What type of hardware do I need?                    

Windows 2000 or XP, languages, etc

2.8.2 Are their any different versions? Like a standalone           windows interface?                    

Yes, if custom development or real time deduping isn’t what you need, MatchUp is also available in a Windows standalone version with real time analyzing, reporting and many other database tools.

2.8.3 How many users can use my license?                      

A single license generally allows a single computer to be running MatchUp. For questions regarding copyright, licensing, and multiple licensing ( or site - licenses ), contact Melissa Data Sales.This is an important topic beyond the scope of the FAQ

2.8.4 What type of support do you offer?                      

Technical support is always free, as are the frequent updates, and many online resources found on our website.

2.8.5 Can I process dual name fields?                      

When you want to match ‘John Smith’ to a record which has ‘Mr. and Mrs. John and Mary Smith’, you may get lucky, and catch these as dupes, but if the dual name has different last names, you may not be so lucky. The real solution is Personator for Windows, or the Personator API, which does parse dual names into separate components, and gives you the flexibility to either remove the second name or create another record with the second name.

2.8.6 Can I assign a confidence percent to select            Duplicates?                      

MatchUp does not assign a confidence percent number because a fuzzy match on name and address may be a 40% match for customer A, but only 15% for customer B, putting MatchUp in a precarious position of grading matchcodes. Instead, we let you simultaneously match on 16 matchcodes, and return a status code stating which matchcode combinations a record hit on. This lets the user evaluate the status string and determine himself that a match on combinations 123458 is a 99% match, and a match on combinations 78 are only a 15% confidence.

2.8.7 Does it process International Data?                    

MatchUp processes US, Canadian, and UK addresses. Other international data can be matched using a combination of Full Address lines (we don’t know how to parse all of those other countries)and our Street Splitter’s best guess. Of course if you use Names formatted in the same order as domestic data, or other data types as a general data type, you should be OK. Give MatchUp a ride with a free demo version if you need to make sure.