HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide
You use the event facility to manipulate the target Datareplicator's operations from the source Datareplicator.
To use the event facility, you must specify in the target environment definition for the target Datareplicator the processing that is to correspond to each event code. For details about how to specify event codes for the target Datareplicator, see 4.7.3 Designing the import procedure.
To use the event issuing facility, execute the hdeevent command at the source Datareplicator with an event code specified. The hdeevent command issues an SQL statement to the event control table and outputs update information for event control to the system log file. The source Datareplicator extracts this update information for event control and sends it to the target Datareplicator in order to manipulate its processing. Immediately upon detection of update information for event control, the source Datareplicator starts transmission to the target Datareplicator without waiting for the transmission interval. After the transmission processing is completed, the source Datareplicator waits for the next transmission interval.
You must create an event control table at the source HiRDB before starting the source Datareplicator.
The following table shows the permitted range of event codes and the corresponding actions.
Table 4-34 Event code ranges and corresponding actions
| Range | Action |
|---|---|
| 0 | Terminates the transmission process (information is not sent to the target Datareplicator). |
| 1 to 255 | Sends the specified event code to the target Datareplicator. |
| Other | Information is not sent to the target Datareplicator. |
When you execute the hdeevent command, the SQL statement shown below is issued to the source HiRDB. If the source HiRDB is a parallel server, the SQL statement is issued to all back-end servers.
LOCK TABLE "hde_dtbl" IN SHARE MODE UPDATE "hde_dtbl" SET EVNO = user-specified-event-code COMMIT WORK
Instead of executing the hdeevent command, you can issue a similar SQL statement directly to the target Datareplicator. However, you must not take any other action using the event control table.
The following describes the conditions for creating an event control table before starting the source Datareplicator.
Create the event control table with any user ID.
When you execute the hdeevent command, you will specify the user ID used to create the event control table. If you omit the user ID when you execute the hdeevent command, the value of the PDUSER environment variable will be assumed.
The table name is always hde_dtbl.
Specify the FIX attribute.
The following table shows the structure of an event control table.
Table 4-35 Structure of an event control table
| Column name | Column attribute | Column length | Value |
|---|---|---|---|
| KEY | INTEGER | 1 | integer |
| EVNO | INTEGER | 1 | 0 |
| SNDID | CHAR | 10 | '0' |
Figure 4-37 Example of event control table when the source HiRDB is a single server
Figure 4-38 Example of event control table when the source HiRDB is a parallel server
All rights reserved. Copyright (C) 2007, 2013, Hitachi, Ltd.