IBM Books

Replication Guide and Reference


Returning control to users with the ASNJDONE exit routine

If you specify the NOTIFY parameter when you start DataPropagator for Microsoft Jet with the ASNJET command, DataPropagator for Microsoft Jet calls the exit routine ASNJDONE at the completion of each subscription set , regardless of success or failure. ASNJDONE.SMP is a sample program shipped with the product. You can modify it to meet the requirements of your installation. For example, the exit routine can examine the error table to discover rejected updates and initiate further actions, such as issuing a message or generating an alert.

See the prologue section in the sample exit routine ASNJDONE.SMP for instructions on how to modify the sample.

Parameters

The parameters that DataPropagator for Microsoft Jet passes to ASNJDONE are:

Control server
The control server alias.

Set name
The name of the set just processed.

Apply qualifier
The Apply qualifier of this DataPropagator for Microsoft Jet instance.

Trace option
The trace option specified when DataPropagator for Microsoft Jet was started.

Status value
Set to a value of 0 for success, and -1 for failure.

Error recovery

If the status value that DataPropagator for Microsoft Jet passes to ASNJDONE is -1, conflicts or errors might have been recorded. You can set the exit routine to examine the error codes and messages in the error message table. (There can be more than one row in the error message table.)

When DataPropagator for Microsoft Jet detects an update conflict between the RDBMS source and row-replica target table, it saves additional information for the ASNJDONE exit routine as follows:

For other errors, such as referential integrity checks, DataPropagator for Microsoft Jet places additional information in the error information table, if applicable, to identify the row-replica table and the row that caused the error.

The exit routine can use this information to take remedial action. When the exit routine returns, the status is still -1 in the subscription set table. DataPropagator for Microsoft Jet does not expect any output or return codes from the exit routine.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]