Overview of Functions

This section provides an overview of Oracle GoldenGate functions for the NonStop platform.

Function Syntax

Field conversion functions use the following general syntax:

@FUNCTION (expression)

@FUNCTION

The function name, such as @DATE or @IF.

(expression)

The operations for the function to perform. The operations depend on the function.

Function Summaries

This section summarizes the Oracle GoldenGate functions for NonStop, based on their functionality. An alphabetized reference of the functions follows this section.

Working with Columns

Function Description
COLSTAT
Returns whether a column is missing, NULL or an invalid value.
COLTEST
Tests whether a column is present in a record, missing, NULL or an invalid value.
VALONEOF
Returns TRUE if a column contains one of a list of values.

Working with Dates

Function Description
DATE
Returns a date from a variety of sources in a variety of output formats.
DATEDIFF
Returns the difference between two dates or datetimes, in days or seconds
DATENOW
Returns the current date and time.

Working with Numbers and Arithmetic Expressions

Function Description
COMPUTE
Returns the result of an arithmetic expression.
CONVERTFLOAT
Converts Tandem float numbers from the HP NonStop to and from the IEEE format used for Windows and UNIX.

Working with Conditional Statements

Function Description
CASE
Selects a value depending on a series of value tests.
EVAL
Selects a value depending on a series of independent tests.
GETVAL
Extracts parameters from a stored procedure as input to a FILTER or COLMAP clause.
IF
Selects one of two values depending on whether a conditional statement returns TRUE or FALSE.

Working with Character and Numeric Strings

Function Description
BINARY
Keeps source data in its original binary format in the target column when the source column is defined as a character column.
HIGHVAL | LOWVAL
Emulates the COBOL high and low value functions. Sets COBOL-type group level to either a high or low values when specified conditions are met.
NUMBINNUMBIN
Converts a binary string into a number (for example, a 48-bit Himalaya timestamp).
NUMSTR
Converts a string into a number.
STRCAT
Concatenates one or more strings.
STRCMP
Compares two strings and returns a result of less than, equal, or greater than.
STREQ
Compares two strings and returns a Boolean result of equal or not equal.
STREXT
Extracts selected characters from a string.
STRFIND
Finds the occurrence of a string within a string.
STRLEN
Returns the length of a string.
STRLTRIM
Trims leading spaces in a column.
STRNCAT
Concatenates one or more strings up to a limited number of characters per string.
STRNCMP
Compares two strings up to a certain number of characters.
STRNUM
Converts a number into a string, with justification and zero-fill options.
STRRTRIM
Trims trailing spaces in a column.
STRSUB
Substitutes one string for another within a column.
STRTRIM
Trims leading and trailing spaces in a column.
STRUP
Changes a string to uppercase.

Environmental Information

Function Description
GETENV
Returns information about the Oracle GoldenGate environment.