TEXT and BYTE (LOB) types

Informix®

Informix provides the TEXT, BYTE, CLOB and BLOB data types to store very large texts or binary data.

Legacy Informix 4GL applications typically use the TEXT and BYTE types.

Genero BDL does not support the Informix CLOB and BLOB types.

IBM® DB2®

IBM DB2 supports the BLOB and CLOB/NCLOB/DBCLOB data types for large objects (LOB) storage.

Depending on the nchar_mapping DB2 database configuration parameter, the NCLOB type name can be used as a synonym for CLOB with CODEUNITS32 units specifier, or as DBCLOB with CODEUNITS32 or CODEUNITS16 units specifier.

IBM DB2 allows to specify a maximum size of LOB types. This size will determine storage features (data of small LOBs will be implicitly inlined in rows):
CREATE TABLE tab1 ( ... tx CLOB(200K) ... )

With DB2 LUW 11.5, the default maximum size of CLOB/DBCLOB types is 1,048,576 (1M) code units. For the BLOB type, the default is 1,048,576 (1M) bytes.

Solution

The DB2 database interface can convert BDL TEXT data to DB2 CLOB and BYTE data to DB2 BLOB.

Note that DB2 CLOB and BLOB columns are created with a size of 500K, while Genero TEXT/BYTE program variables have a limit of 2 gigabytes. Make sure that the large object data does not exceed this limit.

The TEXT and BYTE types translation can be controlled with the following FGLPROFILE entries:
dbi.database.dsname.ifxemul.datatype.text = { true | false }
dbi.database.dsname.ifxemul.datatype.byte = { true | false }
For more details see IBM Informix emulation parameters in FGLPROFILE.