GET_TRANSACTION_IND
Valid For
Extract and Replicat
Description
Use the GET_TRANSACTION_IND function to determine whether a data record is the first, last or middle operation in a transaction. This can be useful when, for example, a user exit can compile the details of each transaction and output a special summary record.
Syntax
#include "usrdecs.h"
short result_code;
record_def record;
ERCALLBACK (GET_TRANSACTION_IND, &record, &result_code);
Buffer
typedef struct
{
char *table_name;
char *buffer;
long length;
char before_after_ind;
short io_type;
short record_type;
short transaction_ind;
int64_t timestamp;
exit_ts_str io_datetime;
short mapped;
short source_or_target;
/* Version 2 CALLBACK_STRUCT_VERSION */
char requesting_before_after_ind;
} record_def;
Input
None
Output
transaction_ind
The returned transaction indicator, represented as one of the following:
BEGIN_TRANS_VAL
The record is the beginning of a transaction.
MIDDLE_TRANS_VAL
The record is in the middle of a transaction.
END_TRANS_VAL
The record is the end of a transaction.
WHOLE_TRANS_VAL
The record is the only one in the transaction.
Return Values
EXIT_FN_RET_INVALID_CONTEXT
EXIT_FN_RET_OK