7.3 EXIT_CALL_TYPE

EXIT_CALL_TYPE indicates the processing point of the caller and determines the type of processing to perform. Extract and Replicat use the following types of calls.

Call Description
EXIT_CALL_BEGIN_TRANS

In Extract, invoked just before the output of the first record in a transaction. In Replicat, invoked just before the start of a replicated transaction.

EXIT_CALL_DISCARD_RECORD

Called when a record is discarded. Records can be discarded for several reasons, such as the changed record is out-of-sync with the current version of an SQL table.

When DISCARD-RECORD is specified, the associated buffer is passed and custom discard processing can be specified.

EXIT_CALL_END_TRANS

In Extract and Replicat, invoked just after the last record in a transaction is processed.

EXIT_CALL_FILE_CLOSE

Invoked by a direct read Extract when it closes the current data file.

EXIT_CALL_PROCESS_RECORD

In Extract, invoked before a record buffer is output to a trail or file. In Replicat, invoked just before a Replicat operation is performed. This call is the basis of most user exit processing.

When a PROCESS_RECORD call is invoked, the record buffer and parameters describing the record are supplied to the user exit. You can map, transform, clean or perform virtually any other operation with the record. You can return a status indicating whether the caller should process or ignore the record.

EXIT_CALL_START

Invoked at the start of processing. The user exit can perform initialization work, such as opening files, initializing variables, and so forth.

EXIT_CALL_STOP

Invoked before the caller stops or ends abnormally. The user exit can perform completion work, such as closing files or outputting totals.