Previous Topic Next topic Print topic


Data Type Mapping

Restriction: This topic applies only when a Database Connectors license has been installed via the Micro Focus License Management System, and applies to Windows platforms only.

DB2 data types must be mapped to COBOL data types. In the table below, note that XFD directives have been applied to the COBOL data types. For additional information on XFD directives, see Using XFD Directives.

COBOL Data Type for DB2
Date (DATE XFD directive applied) date
binary (BINARY XFD directive applied) char (2 * x)
varchar (VAR_LENGTH XFD directive applied)    varchar
float float
pic 9(4) smallint
pic 9(9) integer
pic 9(10) decimal(10,0)
pic 9(x)v9(y) decimal (x + y, y)
pic x(254) char
pic x(255) or greater must apply VAR_LENGTH XFD directive
Previous Topic Next topic Print topic