Method One (Handle Using Your Replicat Configuration)

Note:

This is the preferred method of handling tables with SYSKEY or clustered keys.

This method maps the source SYSKEY to an additional column in the target table. Replicat can then be configured to use the key value to locate a target row that has the same key value.

  1. Add a column named GGS_SYSKEY to the target table.
  2. In the MAP statement, map the source SYSKEY column to the GGS_SYSKEY column by means of a COLMAP clause.
  3. Specify the GGS_SYSKEY column in a KEYCOLS clause in the same MAP statement. This ensures that the unique source SYSKEY value is used as the key for the target table.

The following is an example of this procedure:

Source table:

CREATE TABLE DEV.TSSCAT.ENTRY
  (
    COLA    INT DEFAULT NULL
  , COLB    CHAR(20)  DEFAULT DEFAULT NULL
  )

Target table:

If the target table has a clustered key rather than a SYSKEY, include the user-defined columns in the STORE BY clause.

CREATE TABLE DEV.TASCAT.ENTRY
  (
    GGS_SYSKEY  LARGEINT NO DEFAULT NOT NULL
  , COLA        INT DEFAULT NULL
  , COLB        CHAR(20) DEFAULT DEFAULT NULL
  )
  STORE BY (GGS_SYSKEY ASC);

MAP statement:

If the target table has a clustered key rather than a SYSKEY, include the user-defined columns in the STORE BY clause.

MAP TSSCAT.ENTRY, TARGET TASCAT.ENTRY,
   COLMAP (ggs_syskey = syskey, USEDEFAULTS),
   KEYCOLS (ggs_syskey);