INSERTALLRECORDS
Valid For
Replicat
This parameter does not work with UPDATERECORDFORMAT COMPACT.
Description
Use the INSERTALLRECORDS parameter to keep a record of all operations made to a target record, instead of maintaining just the current version. INSERTALLRECORDS causes Replicat to insert every change that is made to a record as a new record in the database. The initial insert and subsequent updates and deletes are maintained as point-in-time snapshots.
Some cases for using INSERTALLRECORDS are the following:
-
To work within an exceptions
MAPstatement. In an exceptionsMAPstatement,INSERTALLRECORDScauses the values of operations that generated errors to be inserted as new records in an exceptions table as part of an error-handling strategy. -
To maintain a transaction history. By inserting every change to a specific row as a new record in the database, you can maintain a history of all changes made to that row, instead of maintaining just the current version. Each insert is a point-in-time snapshot that can be queried as needed for auditing purposes. Combining historical data with special transaction information provides a way to create a more useful target reporting database.
INSERTALLRECORDS can be used at the root level of the parameter file to affect all subsequent MAP statements, and it can be used within a MAP statement to affect a specific table or multiple tables specified with a wildcard.
Getting More Information about INSERTALLRECORDS
See “TABLE | MAP” for MAP syntax.
Default
None
Syntax
INSERTALLRECORDS
Examples
Example 1
This example shows INSERTALLRECORDS at the root level of the parameter file as part of an exceptions handling configuration.
COLMAP (USEDEFAULTS,
TRAN_TIME = @GETENV("GGHEADER","COMMITTIMESTAMP"),
OP_TYPE = @GETENV("GGHEADER", "OPTYPE"),
BEFORE_AFTER_IND = @GETENV("GGHEADER", "BEFOREAFTERINDICATOR"),
SEQUENCE_ID = @COMPUTE(@COMPUTE(@NUMSTR(@GETENV ("RECORD", "FILESEQNO"))*100000000000)+@NUMSTR(@GETENV ("RECORD", "FILERBA")))
);
Example 2
This example shows INSERTALLRECORDS in a MAP statement.
REPLICAT deliv
USERIDALIAS tiger1
SOURCEDEFS /ggs/dirdef/defs
REPERROR DEFAULT, ABEND
MAP fin.accTAB, TARGET fin.custTAB, INSERTALLRECORDS;