Column functions

CDC Replication provides a number of column functions that you can use in expressions when mapping target columns.

Before using column functions in expressions, you should consider the following:

  • Depending on the replication engine that you have installed, some column functions may not be supported.
  • Names of column functions are case insensitive.
  • For some column functions, you cannot specify a large object (LOB) column as a function parameter. For more information about LOB data type support, see the CDC Replication documentation for your database platform.
  • You can specify character literals in their internal numeric representation, as parameters for column functions. To do this, use the double-angled bracket notation (<< >>). This notation lets you work with character literals that contain both printable and non-printable characters.
  • Specifying character values as decimal integers:
    • The values you specify within brackets are decimal integers that represent either American Standard Code for Information Interchange (ASCII) or Extended Binary Coded Decimal Interchange Code (EBCDIC) characters. For ASCII characters, these values must be in the range of 0 to 127. For EBCDIC, these values must be in the range of 0 to 255. For example, <<32>> represents a blank character in ASCII. Do not prefix these values with zeroes.
    • If you have installed the CDC Replication Engine for Db2® for z/OS® or the CDC Replication Engine for Db2 for i as a target system, and the column function manipulates a value from a target column, then specify integers in EBCDIC format. For all other replication engines installed on the target system, you can specify integers in ASCII format.
  • the CDC Replication Engine for Db2 for z/OS does not support the double-angled bracket notation.
  • You can specify multiple characters in the same character literal. For example, if you are using the ASCII character set, the notation <<65>><<78>><<78>><<65>> and <<65>>NN<<65>> represent the string ANNA.
  • If you do not follow the double-angled bracket notation, such as <45>>, then CDC Replication does not generate an error. Instead, CDC Replication treats it as a sequence of characters (<, 4, 5, >, and >), and returns the result based on this sequence.
  • To specify NULL as a parameter in a column function, enter NULL without any delimiter.
  • Many databases have column name length limitations, which can affect how some expressions and user exits are handled. Column name length limitations can cause CDC Replication to describe a column alias to the target when the source column name length exceeds the column name length limit on the target. The restriction is 30 characters for most CDC Replication compatible databases (IBM® DB2® for Linux, UNIX, and Windows and Oracle). Microsoft SQL Server has a limit of 128 characters.