<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.melissadata.com/index.php?action=history&amp;feed=atom&amp;title=MatchUp_Object%3AIncremental%3AOrder_of_Operations</id>
	<title>MatchUp Object:Incremental:Order of Operations - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.melissadata.com/index.php?action=history&amp;feed=atom&amp;title=MatchUp_Object%3AIncremental%3AOrder_of_Operations"/>
	<link rel="alternate" type="text/html" href="http://wiki.melissadata.com/index.php?title=MatchUp_Object:Incremental:Order_of_Operations&amp;action=history"/>
	<updated>2026-06-20T00:14:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://wiki.melissadata.com/index.php?title=MatchUp_Object:Incremental:Order_of_Operations&amp;diff=11995&amp;oldid=prev</id>
		<title>Admin at 21:45, 19 December 2016</title>
		<link rel="alternate" type="text/html" href="http://wiki.melissadata.com/index.php?title=MatchUp_Object:Incremental:Order_of_Operations&amp;diff=11995&amp;oldid=prev"/>
		<updated>2016-12-19T21:45:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:45, 19 December 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In order to successfully initialize this new instance, point it toward its data files and supply a valid &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;license string&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In order to successfully initialize this new instance, point it toward its data files and supply a valid &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;License Key&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.melissadata.com/index.php?title=MatchUp_Object:Incremental:Order_of_Operations&amp;diff=9411&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;{{MatchUpObjectIncrementalNav}}  {{CustomTOC}}  ==Basic Steps== These are the basic steps of a typical implementation of the Incremental interface. #Initialize the Incremental...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.melissadata.com/index.php?title=MatchUp_Object:Incremental:Order_of_Operations&amp;diff=9411&amp;oldid=prev"/>
		<updated>2015-07-29T00:02:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{MatchUpObjectIncrementalNav}}  {{CustomTOC}}  ==Basic Steps== These are the basic steps of a typical implementation of the Incremental interface. #Initialize the Incremental...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{MatchUpObjectIncrementalNav}}&lt;br /&gt;
&lt;br /&gt;
{{CustomTOC}}&lt;br /&gt;
&lt;br /&gt;
==Basic Steps==&lt;br /&gt;
These are the basic steps of a typical implementation of the Incremental interface.&lt;br /&gt;
#Initialize the Incremental interface.&lt;br /&gt;
#:After creating an instance of the Incremental interface, point the object toward its supporting data file, select a matchcode and key file to use, and initialize these files.&lt;br /&gt;
#Create field mappings.&lt;br /&gt;
#:In order to build a key to compare to the key file, the Incremental interface needs to know which types of data the program will be passing to the interface and in what order.&lt;br /&gt;
#Read the record from the data source.&lt;br /&gt;
#:This can be a new address passed from a website, a single record from a newly acquired list or data source, to be compared against the master list.&lt;br /&gt;
#Build a match key for the incoming record.&lt;br /&gt;
#:This consists of passing the actual data to the interface in the same order used when creating a field mapping. After passing the necessary fields (usually a small subset of the fields from each record) via the [[MatchUp Object:Incremental:Match Key#AddField|AddField]] function, the Incremental interface uses this information to generate a match key.&lt;br /&gt;
#Compare the match key to the key file.&lt;br /&gt;
#:The [[MatchUp Object:Incremental:Comparison#MatchRecord|MatchRecord]] function searches the key file for any keys that match the new record. If it finds a match, it provides information on the duplicate records in the key file.&lt;br /&gt;
#Write new records to the key file.&lt;br /&gt;
#:The new key, whether or not it is unique, can then be written to the key file, so it can be used for future deduping operations. The program code must also write the new address record to the database separately.&lt;br /&gt;
&lt;br /&gt;
==Pseudocode Implementation==&lt;br /&gt;
This is a common implementation of the Incremental interface using pseudocode for maximum clarity. Working sample programs in several programming languages can be found on the MatchUp Object install disc.&lt;br /&gt;
&lt;br /&gt;
===Initialize the Incremental interface===&lt;br /&gt;
After creating an instance of the Incremental interface, point the object toward its supporting data file, select a matchcode and key file to use, and initialize these files.&lt;br /&gt;
&lt;br /&gt;
First, create a new instance of the Incremental interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SET mu = NEW mdMUIncremental&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to successfully initialize this new instance, point it toward its data files and supply a valid license string.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.SetLicenseString with LicenseString&lt;br /&gt;
CALL mu.SetPathToMatchUpFiles with PathToMatchUpFiles&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before initialization, specify which matchcode and key file will be used for the current deduping operation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.SetMatchcodeName with MatchCodeName&lt;br /&gt;
CALL mu.SetKeyFile with PathToKeyFile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If all of the above have been set correctly, calling the [[MatchUp Object:Incremental:Mapping#InitializeDataFiles|InitializeDataFiles]] function should return a value of NoError. If it does not, call the [[MatchUp Object:Incremental:Mapping#GetInitializeErrorString|GetInitializeErrorString]] function to determine the reason for the failure to initialize.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.InitializeDataFiles RETURNING initResult&lt;br /&gt;
IF initResult is not NoError THEN&lt;br /&gt;
  PRINT &amp;quot;Initialization Error: &amp;quot; + mu.GetInitializeErrorString&lt;br /&gt;
  EXIT PROGRAM&lt;br /&gt;
END IF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the initialization was successful, call the following functions to display version and expiration information about the instance of MatchUp Object currently in use on the local computer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PRINT &amp;quot;Confirming Initialization: &amp;quot; + mu.GetInitializeErrorString&lt;br /&gt;
PRINT &amp;quot;Build Number: &amp;quot; + mu.GetBuildNumber&lt;br /&gt;
PRINT &amp;quot;Database Date: &amp;quot; + mu.GetDatabaseDate&lt;br /&gt;
PRINT &amp;quot;Database Expiration Date: &amp;quot; + mu.GetDatabaseExpirationDate&lt;br /&gt;
PRINT &amp;quot;License Expiration Date: &amp;quot; + mu.GetLicenseExpirationDate&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create field mappings===&lt;br /&gt;
Field mappings define a valid incoming type of data for each matchcode component. For example, a typical matchcode may include a five-digit ZIP Code, a last name, and a street address. But the data coming in, however, may contain the city, state, and ZIP as a single character field and the person’s full name as a single field as well.&lt;br /&gt;
&lt;br /&gt;
Even if the fields in a database do not exactly match the components required by the matchcode, MatchUp Object is able to extract only the information it needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.ClearMappings&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After clearing any mappings from a previous use of the Incremental interface, call the [[MatchUp Object:Incremental:Mapping#AddMapping|AddMapping]] function once for each field being considered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.AddMapping with mu.CityStZip RETURNING mapOK&lt;br /&gt;
CALL mu.AddMapping with mu.FullName RETURNING mapOK&lt;br /&gt;
CALL mu.AddMapping with mu.Address RETURNING mapOK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Get the record from the data source===&lt;br /&gt;
Regardless of the source, the object only needs to read the fields containing the data that the Incremental interface needs for comparison.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
READ Record FROM database RETURNING userInfo, CityStateZip, TheFullName, StreetAddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The userInfo field is any identifying character string that is unique to the current record.&lt;br /&gt;
&lt;br /&gt;
Note that the Incremental interface does not handle database input and output. This must be done programmatically using whatever database interface is being used.&lt;br /&gt;
&lt;br /&gt;
===Build the match key for the current record===&lt;br /&gt;
Now we use the data from the previous step to construct a match key to use in the next step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.ClearFields&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After clearing any data from a previous use of the Incremental interface, call the [[MatchUp Object:Incremental:Match Key#AddField|AddField]] function once for each field being considered.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.AddField with CityStateZip&lt;br /&gt;
CALL mu.AddField with TheFullName&lt;br /&gt;
CALL mu.AddField with StreetAddress&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pass the &amp;#039;&amp;#039;&amp;#039;userInfo&amp;#039;&amp;#039;&amp;#039; to the interface using the [[MatchUp Object:Incremental:Match Key#SetUserInfo|SetUserInfo]] function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.SetUserInfo with userInfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The [[MatchUp Object:Incremental:Match Key#BuildKey|BuildKey]] function constructs the match key out of the information passed via the [[MatchUp Object:Incremental:Match Key#AddField|AddField]] function calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.BuildKey&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compare the match key to the key file===&lt;br /&gt;
The [[MatchUp Object:Incremental:Comparison#MatchRecord|MatchRecord]] function compares the match key to the key file and determines if the key already exists in the key file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.MatchRecord&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the [[MatchUp Object:Incremental:Comparison#GetResults|GetResults]] function to determine if the [[MatchUp Object:Incremental:Comparison#MatchRecord|MatchRecord]] call produced a match, meaning that the current record is a duplicate to another one in the key file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL mu.GetResults RETURNING ResultsCodes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the record is a duplicate, this code retrieves information about the other duplicate records in the database.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ResultsCodes contains “MS03” THEN // Record is a duplicate&lt;br /&gt;
  PRINT &amp;quot;This record is in the database.&amp;quot;&lt;br /&gt;
  PRINT &amp;quot;There are &amp;quot; + mu.GetCount + &amp;quot; records in dupe group #&amp;quot; + mu.GetDupeGroup&lt;br /&gt;
  PRINT &amp;quot;It matches these records:&amp;quot;&lt;br /&gt;
WHILE mu.NextMatchingRecord&lt;br /&gt;
  PRINT &amp;quot;#&amp;quot; + mu.GetEntry + &amp;quot; is Record: &amp;quot; + mu.GetUserInfo&lt;br /&gt;
ENDWHILE&lt;br /&gt;
&lt;br /&gt;
“Dupe Group” is a number that gets assigned to each unique record. Duplicate records are assigned the same number.&lt;br /&gt;
&lt;br /&gt;
===Add the new key to the key file===&lt;br /&gt;
In this example, duplicate records are being rejected while unique records are being added to the database. Depending on the end user needs, the program may handle duplicate records differently.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ELSE&lt;br /&gt;
  CALL mu.AddRecord&lt;br /&gt;
  Add New Record to master database&lt;br /&gt;
ENDIF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[MatchUp Object:Incremental:Key File#AddRecord|AddRecord]] function only adds the new key to the key file. To add the data to the database, the developer would need to implement that in code, according to whatever database engine is in use.&lt;br /&gt;
&lt;br /&gt;
==Using the Transaction Functions==&lt;br /&gt;
The [[MatchUp Object:Incremental:Transaction|transaction]] functions allow MatchUp Object to delay writing changes to the historical database until all records have been compared and all duplicates detected. After a call to the [[MatchUp Object:Incremental:Transaction#BeginTransaction|BeginTransaction]] function, the Incremental interface will cache all calls to the [[MatchUp Object:Incremental:Key File#AddRecord|AddRecord]] function until a call to the [[MatchUp Object:Incremental:Transaction#CommitTransaction|CommitTransaction]] function, which writes all changes to the keyfile in a single operation, significantly speeding up processing.&lt;br /&gt;
&lt;br /&gt;
If any errors are detected, the [[MatchUp Object:Incremental:Transaction#RollbackTransaction|RollbackTransaction]] function flushes all [[MatchUp Object:Incremental:Key File#AddRecord|AddRecord]] function calls since the call to the [[MatchUp Object:Incremental:Transaction#BeginTransaction|BeginTransaction]] function and no changes will be written to the historical database.&lt;br /&gt;
&lt;br /&gt;
Below is a simplified example of how transactions work with the Incremental interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CALL BeginTransaction&lt;br /&gt;
FOR EACH Record in DatabaseTable&lt;br /&gt;
  READ Record&lt;br /&gt;
  Build Match Key&lt;br /&gt;
  CALL MatchRecord&lt;br /&gt;
  IF Record Is Unique THEN&lt;br /&gt;
    CALL AddRecord&lt;br /&gt;
  ENDIF&lt;br /&gt;
NEXT Record&lt;br /&gt;
IF ERROR&lt;br /&gt;
  CALL RollbackTransaction&lt;br /&gt;
  Return&lt;br /&gt;
ENDIF&lt;br /&gt;
CALL CommitTransaction&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MatchUp Object]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>