The Db2 Utility Detection user exit

You can provide a user exit to specify a corrective response when an action that was taken by a Db2® utility program potentially desynchronizes a table that is being replicated.

The user exit is driven for all running subscriptions when the ONUTILITYACTION keyword specifies the value USEREXIT. It is a single user exit for the executing CDC for Db2 for z/OS® instance, and cannot be specified by using the Management Console. The user exit load module is located in the CHCUSRXT DD load library or on the STEPLIB DD concatenation by name. The name must be CHCDUDUE.

This user exit is supplied with all pertinent information about the desynchronizing action that was taken by the DB2® utility. You can program the exit to respond from the set of actions that are available with the ONUTILITYACTION keyword, based on the information that the exit received.

After you write a CHCDUDUE user exit program, you compile and link the program.

Predefined entry data structures for the exit

When the CHCDUDUE user exit program is invoked, predefined data structures are passed to the program. These structures are used to pass information about the desynchronizing action that caused the user exit program to be invoked. In addition, the user exit program can return information through the same data structures for access in subsequent calls. Therefore, these structures must be defined in each user exit program so that the information can be recognized and processed. Your user exit program can then reference specific items of information in the data structures.

Sample CHCDUDUE user exit program

A sample user exit program is provided with CDC for Db2 for z/OS. You might want to use a sample program as a base from which you develop your user exit program. The sample CHCDUDUE user exit is contained in the CHCSAMDX member (located in the SCHCC SMP/E target library).

This program loads a parameter file during initialization. The parameter file can specify differing response actions to be taken for different combinations of subscription, database, table space, table owner, and table. Messages about the action that was taken or errors that were encountered are written to the STDOUT SPOOL data set.