Adding and removing entries on a user index

The Add User Index Entry (QUSADDUI) and Remove User Index Entry (QUSRMVUI) APIs can be used to update user indexes. User index updates are only replicated when using these API interfaces. Updates made directly to user indexes using the Insert Independent Index Entry (INSINXEN) and Remove Independent Index Entry (RMVINXEN) MI instructions are not replicated.

Applications should be examined to understand whether the MI instructions are being used. If the application must use the MI instructions to update a replicated user index, the application can be updated to asynchronously replicate the object by calling the Add or Remove User Index Entry APIs after a block of updates is made with the MI instructions. A call to QUSADDUI or QUSRMVUI API will cause the entire user index to be replicated, via a save of the user index and restore on the target.

The active/passive environment is recommended when using MI instructions to avoid conflicting updates which may be overwritten. If active/active replication is required, it may be achieved by locking the user index object in the application code before adding or removing entries. The Allocate Object (ALCOBJ) command can be used with the MIRROR(*YES) parameter to lock the object on both nodes.

There may be additional locking considerations if the application will be running during resynchronization processing.