Automatic synchronization (*AUTOSYNC) and held due to error (*HLDERR) are essentially predefined resolution methods. When you specify *HLDERR or *AUTOSYNC in a data group definition or a data group file entry, that method is used for all 12 of the collision points. If you specify a named collision resolution class in a data group definition or data group file entry, you can customize what resolution method to use at each collision point.
Within a collision resolution class, you can specify one or more resolution method to use for each collision point. *AUTOSYNC and *HLDERR are available for use at each collision point. Additionally, the following resolution methods are also available:
-
Exit program: (*EXITPGM) A specified user exit program is called to handle the data collision. This method is available for all collision points.
The MXCCUSREXT service program dynamically links your exit program. The MXCCUSREXT service program is shipped with MIMIX and runs on the target system.
The exit program is called on three occasions. The first occasion is when the data group is started. This call allows the exit program to handle any initialization or set up you need to perform.
The MXCCUSREXT service program (and your exit program) is called if a collision occurs at a collision point for which you have indicated that an exit program should perform collision resolution actions.
Finally, the exit program is called when the data group is ended.
-
Field merge: (*FLDMRG) This method is only available for the update collision point 3, used with keyed replication. If certain rules are met, fields from the after-image are merged with the current image of the file to create a merged record that is written to the file. Each field within the record is checked using the series of algorithms below.
In the following algorithms, these abbreviations are used:
RUB = before-image of the source file
RUP = after-image of the source file
RCD = current record image of the target file
- If the RUB equals the RUP and the RUB equals the RCD, do not change the RUP field data.
- If the RUB equals the RUP and the RUB does not equal the RCD, copy the RCD field data into the RUP record.
- If the RUB does not equal the RUP and the RUB equals the RCD, do not change the RUP field data.
- If the RUB does not equal the RUP and the RUB does not equal the RCD, fail the field-level merge.
-
Applied: (*APPLIED) This method is only available for the update collision point 3 and the delete collision point 1. For update collision point 3, the transaction is ignored if the record to be updated already equals the data in the updated record. For delete collision point 1, the transaction is ignored because the record does not exist.
If multiple collision resolution methods are specified and do not resolve the problem MIMIX will always use *HLDERR as the last resort, placing the file on hold.