2.89 FORCEUSESYSKEY | NOFORCEUSESYSKEY

Valid for

Replicat

Description

Use FORCEUSESYSKEY to force Replicat to use the mapped SYSKEY when executing update and delete operations on entry-sequenced SQL tables. For relative SQL tables, the default is to include the syskey unless other KEYCOLS have been specified. When using FORCEUSESYSKEY, include SYSKEY in a COLMAP statement to ensure that the proper row is updated or deleted in the target table. NOFORCEUSESYSKEY results in SYSKEY being omitted from the WHERE clause for entry-sequenced SQL updates and deletes (an alternative path is assumed).

For inserts on relative Enscribe files, FORCEUSESYSKEY forces the SYSKEY to be -1 (insert at end of file). If FORCEUSESYSKEY is used on the target file, the source file SYSKEY cannot be used for update and delete operations since there is no assurance the two keys will match. In this case a unique alternate key or index should be used for updates and deletes.

This parameter has no effect on entry-sequenced or key-sequenced Enscribe files, or on standard key-sequenced or cluster key SQL tables.

Do not use when you are using the MAP KEYCOLS option.

Default

NOFORCEUSESYSKEY

Syntax

FORCEUSESYSKEY | NOFORCEUSESYSKEY

Examples

Example 1   

In this example the SYSKEY from the source table is stored in the SAVE_SYSKEY column when the record is an insert.

GETINSERTS
IGNOREUPDATES
IGNOREDELETES
MAP $DATA1.DAT.SOURCE, TARGET $DATA2.DAT.TARGET,
COLMAP (AMOUNT = AMT, 
SAVE_SYSKEY = SYSKEY);
Example 2   

Then the saved SYSKEY from the source identifies the target row when the record is an update or delete.

FORCEUSESYSKEY
IGNOREINSERTS
GETUPDATES
GETDELETES
MAP $DATA1.DAT.SOURCE, TARGET $DATA2.DAT.TARGET,
COLMAP (SYSKEY = SAVE_SYSKEY, 
AMOUNT = AMT);
NOFORCEUSESYSKEY