How to merge Names


Template level External Article ID

KBA00021402

Issue

You can use the Name Audit and Merge program to search through your Names database and find possible duplicate names. The audit identifies Name records with duplicate driver license numbers, FBI numbers, local ID numbers, last names, dates of birth, or Social Security Numbers.  You can choose which criteria to use when auditing your Names database.  To use the Name Audit and Merge program, use the following instructions.

Resolution

Run a Name audit

  1. Open the Name Audit and Merge screen by typing namemerg at the Flex command line
  2. Click the Options button to view a list of the types of audits you can perform. The options are:

    me1.jpg

     
  3. Select the type of audit you want to perform from the list and click the Accept button
  4. Click the Go button to start the audit.  A notice appears indicating you will receive a message via mail when the audit completes.  This message is sent to Unix mail. If you are on a Windows server, you will see a message indicating the name merge audit is running

    na2.png

     
  5. Click the OK button to return to the menu. The audit might take a while to complete, so work on something else and come back to it.

    NOTE: You can only run one Name Merge audit at one time.  If there is an audit already in progress when you select Name Audit and Merge form the menu, then a message indicating "A name audit is in progress by [username]".  If you started the audit, then you will be prompted: "Do you want to (C)ancel the audit, (M)erge manually or (E)xit?".  You can only cancel the audit if you started the process or if you are logged into the server as root (Unix) or Admin (Windows).  If another user attempts to cancel a running audit, they will see a message indicating: "Audit can only be canceled by initiator: [username]".  If the name merge fails to complete, then you can remove the name merge lock file using the instructions below to allow you to start the process over.

    Deleting an existing name merge audit: To delete an existing name merge audit, from the Name Audit and Merge screen, you can click the Del button to delete an existing name merge audit. The software will prompt you: "Delete the audit file?".  Click Yes to delete the file.

Merging Names
NOTE: Be careful when merging Names. There is no way to automatically rollback or undo a name merge once it is complete.  If you accidentally merge two Name records incorrectly, you will have to recreate the Name record and manually move all the involvements back to the appropriate records.  It will sometimes be impossible identify which involvements go to which record.  Be extremely cautious before merging the records and review the data to ensure the names should be merged.

Once the audit has completed, you can access the Name Audit and Merge screen and begin merging records.  Use the following instructions to merge the names:

  1. Click the Merg button on the Name Audit and Merge screen.  This will open the mergescr or Name Merge screen where you can see the names identified in the audit
  2. Use the View button to review the Name records to identify if the records are in fact duplicates.  Click View and choose record 1 or 2 to view. The Names screen opens to the record.

    NOTE: The software locks both Name records so other users cannot access them during the merge.  Also, the nmlocid application parameter can be configured to enter the duplicate Name Number in the Local ID field of the real Name record.

     
  3. If you determine the names are not duplicates, then click the Keep button to keep both Name records without merging any data.
  4. If you review the names and determine they are duplicates or that one name is an alias to another, then you can click the Ret1 or Ret2 buttons (Alias1 or Alias2) to retain the first name or make the first name an alias to the second and vice versa.  Be careful.  Once you press either Ret buttons, there is no way to automatically go back as name merges are permanent.  It is easy to unalias names, but it can be extremely difficult to sort out two incorrectly merged names.
  5. 5. While the software is merging the records, a message is displayed on the bottom of the screen which says: "Please wait. The system is transferring data from the duplicate or alias name record to the real name record."  If there are any discrepancies between the two records, then you will be prompted to correct the discrepancies. For example, the middle names are different where one says R, the other says Ross. Here's an example of how the software asks you to fix the discrepancies:

    na3.png

How Namemerg transfers data
When duplicate names are merged into a real Name record, the software transfers the data in the following manner:

  • If one record contains data the other does not, then the data is retained in the real name.
  • If both records contain the same data in a field, then the data is retained in the real name.
  • If one record contains data in a field that differs from another, then the software enters all differing data from the duplicate name into the real Name record or deletes the information, based on how you setup the nmdupdat application parameter.
  • If the records contain different addresses, then the software prompts you to choose the correct address.  The address not chosen is stored in the history table.
  • If the addresses are the same on both records, then the duplicate address is entered into the history table.
  • While the message "Please wait. The system is transferring data from the duplicate or alias name to the real name record." is displayed, the software transfers all detail table data (name history records, M.O data, scars and tattoo data, local ID data, comments, alerts, and involvements) from the duplicate to the real name according to the following logic:
    • If the data is identical in both the real name and duplicate, then the data is not transferred.
    • If the data is different, then the software transfers the information from the duplicate to the real name by appending the data to the detail tables when applicable.
    • When the mgtxtloc application parameter is set to No, all comments from the duplicate record are appended to the Comments field on the real Name record.
    • When the mgtxtloc application parameter is set to Yes, all comments from the duplicate record are appended to the Merge field on the real Name record.
  • At the end of the merge, the software deletes the duplicate Name record.

Manually merging Name records
Sometimes names will fail to merge because they contain data that cannot be automatically merged.  When this happens, you must manually merge the data before proceeding with the name merge.  Here's an example error message:

Cannot merge!  Duplicate records #x and #y in bimain.busnid.

Name Merge aborted.  Please fix errors then try the name merge again.


You should open the applicable records and manually move the name involvement from one Name record to the other.  In this example, you would have to open the bimain table and change the name on the record to the real name.

Application parameters for setup

The following application parameters change the behavior of name merges:

 

Parameter

Description

markdup

Marks records you do not want the namemerg audit to find as duplicate records.  If you set the value of the parameter to YES, then the software marks the name as audited (in a field not visible to the user).  The name will no longer appear in any audits.  It can be turned off by setting the parameter to NO.

mgtxtloc

If the parameter is set to NO, then the comments from the duplicate record are appended to the Comments field on the real Name record.  If it is set to YES, the comments are written to the Merge field. 

nmerglog 

The nmerglog parameter lets you define a log file to help identify users who enter duplicate names and might need more training.  The log file contains the UID, login name and name of the individual who added the more recent of the two name records being merged. This log file is plain-text file you must view through your traditional operating system programs.  To create a log, enter a log file and path in the value of this parameter.  For example, enter /sds/app/force/log/namemerg.log to create a log file at that location.  Aliases will create entries as well as duplicate names.

mergfile 

You can override the default location of the name merge lock file.  Enter the name and location of the file such as /tmp/nmaudit.lck or C:\SpillmanServer\nmaudit.lck.

nmdupdat 

This parameter determines if data for a duplicate name is saved in the real Name record or deleted when a name merge occurs.  The data will be written to the Comments field or the Merge field on the real Name record if enabled by setting the parameters value to YES.

nmlocid 

If enabled by entering a value such as DNM, then the Name Number of the duplicate name will be stored in the Local ID field of the real name. If the parameter is absent or you leave it blank, then the software does not save the Name Numbers.  The value of DNM can be set to any value but it must be defined in the nmtbloc table.


Lock file locations
When an audit is in progress, the software creates a lock file which prevents other users from starting a second name merge audit.  This can be overridden with the mergfile application parameter.  The file is located in the following directory on your server:

Windows

%FORCEDIR%/tmp/nmaudit

Unix

$FORCEDIR/tmp/nmaudit

How to identify who ran namemerg recently

You can use the master log to see who ran the namemerg command recently.  To do this, shell out of Flex and type the following (works only on Unix/Linux systems):

mlv -pnamemerg