GET_ENV_VALUE
Valid For
Extract and Replicat
Description
Use the GET_ENV_VALUE function to return information about the Oracle GoldenGate environment. The information that is supplied is the same as that of the @GETENV column-conversion function and is specified by using the same input values. For more information about the valid information types, environment variables, and return values, see "@GETENV".
If the character session of the user exit is set with SET_SESSION_CHARSET to a value other than the default character set of the operating system, as defined in ULIB_CS_DEFAULT in the ucharset.h file, the character data that is exchanged between the user exit and the process is interpreted in the session character set.
Syntax
#include "usrdecs.h" short result_code; getenv_value_def env_ptr; ERCALLBACK (GET_ENV_VALUE, &env_ptr, &result_code);
Buffer
typedef struct
{
char *information_type;
char *env_value_name;
char *return_value;
long max_return_length;
long actual_length;
short value_truncated;
} getenv_value_def;Input
-
information_type -
The information type that is to be returned, for example
'GGENVIRONMENT' or'GGHEADER'. The information type must be supplied within double quotes. For a list of information types and subsequent detailed descriptions, see "@GETENV". -
env_value_name -
The environment value that is wanted from the information type. The environment value must be supplied within double quotes. For valid values, see "@GETENV". For example, if using the
'GGENVIRONMENT' information type, a valid environment value would be'GROUPNAME'. -
max_return_length -
The maximum length of the buffer for this data.
Output
-
return_value -
A valid return value for the supplied environment value.
-
actual_length -
The actual length of the data in this buffer.
-
value_truncated -
A flag (
0or1) to indicate whether or not the value was truncated. Truncation occurs if the length of the value plus the null terminator exceeds the maximum buffer length.
Return Values
EXIT_FN_RET_OK EXIT_FN_RET_ENV_NOT_FOUND EXIT_FN_RET_INVALID_PARAM