TABLE for Replicat
Valid For
Replicat
Description
Use the TABLE
parameter in a Replicat parameter file to specify filtering rules that qualify a data record from the trail to be eligible for an event action that is specified with EVENTACTIONS
.
This form of TABLE
statement is similar to that of the Replicat MAP
statement, except that there is no mapping of the source table in the data record to a target table by means of a TARGET
clause. TABLE
for Replicat is solely a means of triggering a non-data action to be taken by Replicat when it encounters an event record. If Replicat is in coordinated mode, all actions are processed through the thread with the lowest thread ID.
Because a target table is not supplied, the following apply:
-
No options are available to enable Replicat to map table names or columns to a target table, nor are there options to enable Replicat to manipulate data.
-
The
ASSUMETARGETDEFS
parameter cannot be used in the same parameter file as a ReplicatTABLE
statement, becauseASSUMETARGETDEFS
requires the names of target tables so that Replicat can query for table definitions. You must create a source-definitions file to provide the definitions of the source tables to Replicat. Transfer this file to the target system and use theSOURCEDEFS
parameter in the Replicat parameter file to specify the path name of the file. -
The event record itself is not applied to the target database by Replicat. You must specify either
IGNORE
orDISCARD
as one of theEVENTACTIONS
options.
Syntax
See "TABLE | MAP" for descriptions of the following syntax options.
TABLE table_spec, [, SQLEXEC (SQL_specification), BEFOREFILTER] [, FILTER (filter_clause)] [, WHERE (where_clause)] {, EVENTACTIONS ({IGNORE | DISCARD} [action])} ;
Example
The following example enables Replicat tracing for an order transaction that contains an insert operation for a specific order number (order_no = 1
). The trace information is written to the order_1.trc
trace file. The MAP
parameter specifies the mapping of the source table to the target table.
MAP sales.order, TARGET rpt.order; TABLE sales.order, FILTER (@GETENV ('GGHEADER', 'OPTYPE') = 'INSERT' AND @STREQ (order_no, 1), & EVENTACTIONS (TRACE order_1.trc TRANSACTION);