Before-image values in Event Publishing

When you create a publication, by default only the changed (after-image) value in a column is published. You can also choose to publish the previous (before-image) value of selected columns in a source table.

Restrictions

Publishing of before-image values is not supported for large object (LOB) columns.

When you create a publication, you specify publishing of before-image columns when you select source columns to publish.

The Q Capture program always publishes the before-image value of key columns in the source table.

If you are using the ASNCLP command-line program to create a publication, use the BEFORE VALUES keywords, which are part of the opt-clause of the CREATE PUB command.

For example, the following commands set the environment and create a publication that specifies that the Q Capture program send before-image values for the nonkey columns C10, C11, and C13.

ASNCLP SESSION SET TO Q REPLICATION;
SET RUN SCRIPT NOW STOP ON SQL ERROR ON;
SET SERVER CAPTURE TO DB SAMPLE;
SET CAPTURE SCHEMA SOURCE BSN;
CREATE PUB USING PUBQMAP ‘PUBQ1’
(PUBNAME PUB1 DATA.EMPLOYEE
OPTIONS BEFORE VALUES INCLUDE(C10, C11, C12); 

In the Replication Center, you use the Select Columns window from the Rows and Columns page of the Create Publications wizard to specify the columns for which you want to replicate before-image values. When you specify multiple source tables in the wizard, you use the Message Content page to specify publication of before-image values.