Skip to main content

Db2 for z/OS data type support and correspondence

Db2 type

TQL type

notes

BIGINT

java.lang.Long

BINARY

java.lang.Object

BLOB

java.lang.Object

See Using the Partial Record Policy with CDC Readers

CHAR

java.lang.String

CLOB

java.lang.String

See Using the Partial Record Policy with CDC Readers.

DATE

java.time.LocalDate

DBCLOB

java.lang.String

See Using the Partial Record Policy with CDC Readers.

DECFLOAT

java.math.BigDecimal

DECIMAL

java.math.BigDecimal

DOUBLE

java.lang.Double

FLOAT

java.lang.Double

GRAPHIC

java.lang.String

INTEGER

java.lang.Integer

NUMERIC

java.math.BigDecimal

REAL

java.lang.Double

ROWID

java.lang.Object

SMALLINT

java.lang.Short

TIME

java.time.LocalTime

TIMESTAMP

java.time.LocalDateTime

Db2 precision for fractional seconds can be up to 12 digits but:

  • For initial load, values over 6 digits will be rounded up to 6 digits. For example, 1234561 will be read as 123457.

  • For continuous replication, values over 9 digits will be truncated to 9 digits. For example, 123456780999 will be read as 123456780.

For initial load, if Return DateTime As is String, the timestamp will be in the format YYYY-MM-DD HH:mm:ss.sss.

TIMESTAMP WITH TIME ZONE

java.time.ZonedDateTime

Db2 precision for fractional seconds can be up to 12 digits but:

  • For initial load, values over 6 digits will be rounded up to 6 digits. For example, 1234561 will be read as 123457.

  • For continuous replication, values over 9 digits will be truncated to 9 digits. For example, 123456780999 will be read as 123456780.

For initial load, if Return DateTime As is String, the timestamp will be in the format YYYY-MM-DD HH:mm:ss.sss.

VARBINARY

java.lang.Object

VARCHAR

java.lang.String

VARGRAPHIC

java.lang.String

XML

java.lang.String

See Using the Partial Record Policy with CDC Readers.