8.31 GET_POSITION

Valid For

Extract (data pump only) and Replicat

Description

Use the GET_POSITION function is obtain a read position of an Extract data pump or Replicat in the Oracle GoldenGate trail.

Syntax

#include "usrdecs.h"
short result_code;
ERCALLBACK (GET_POSITION &position_def, &result_code);

Buffer

typedef struct
{
char *position;
long position_len;
short position_type;
short ascii_or_internal;
} position_def;

Input

position_len

Allocation length for the position length.

position_type

Can be one of the following:

STARTUP_CHECKPOINT

The start position in the trail.

CURRENT_CHECKPOINT

The position of the last read in the trail.

column_value_mode

An indicator for the format in which the column value was passed. Currently, only the default Oracle GoldenGate canonical format is supported, as represented by:

EXIT_FN_RAW_FORMAT

Output

*position

A pointer to a buffer representing the position values. This buffer is declared in the position_def as two binary values (unsigned int32t and int32t) as seqnorba for eight bytes in a char field. The user exit must move the data to the correct data type. Using this function on a Little Endian platform will cause the process to "reverse bytes" on the two fields individually.

Return Values

EXIT_FN_RET_INVALID_CONTEXT
EXIT_FN_RET_NOT_SUPPORTED
EXIT_FN_RET_OK