2.252 VERSIONERR

Valid for

Extract

Description

Use VERSIONERR to specify error handling when database definitions are out-of-sync with audit trail records. Extract interprets data from the audit trails according to database definitions current at run-time. When a database definition changes during the course of an Extract run, data can be missed or misinterpreted.

For example, suppose a database column NEWCOL is added to table TAB1 while Extract is running. Any rows added to TAB1 after NEWCOL is added will contain a value for NEWCOL. However, since Extract is working with the old definition (before NEWCOL), NEWCOL values will be missed.

There are three situations to consider with respect to changing database definitions:

  • The record being processed is an old version of the record. For example, the record is missing one or more columns that have since been added to the table. By default Extract considers this a normal condition and processes the record (VERSIONERR OLD CONTINUE).

  • The record being processed is a new version of the record. More columns are present in the record than Extract expects. The danger here is that data can be missed. By default, Extract terminates abnormally in this situation (VERSIONERR NEW ABEND) and can be restarted to pick up the new table definition and any new columns as well. However, if the target application has no need to use the new column, this may be undesirable.

  • The record being processed is simply out of synchronization with the table definition according to Extract. The default response is to terminate abend (VERSIONERR OUTOFSYNC ABEND).

VERSIONERR lets you override these defaults by specifying custom responses to old, new and out-of-sync records.

Syntax

VERSIONERR type, {CONTINUE | WARN | DISCARD | ABEND} 
type

The description of the record being processed. Valid values:

OLD
NEW
OUTOFSYNC 
CONTINUE

Process the record as normal.

WARN

Process the record, but issue a warning to the error file.

DISCARD

Output the record to a discard file, but process more records.

ABEND

Terminate Extract abnormally. This option is appropriate when a new definition should be retrieved.

Example

VERSIONERR NEW, WARN