Large Character Strings (CLOB)

Large character strings (CLOB) enable you to store large amounts of data in columns.

Host Variable Formats

OpenESQL and DB2 ECM
01 clob1     SQL TYPE IS CLOB(2M).

The clob1 format uses the CLOB SQL TYPE.

OpenESQL
01 clob2.
   49 clob2-len    PIC 9(9) COMP.
   49 clob2-data   PIC X(70000).
  • The level number for group items containing only two elementary items must be 49. The first item is a 4-byte field declared with usage COMP or COMP-5 that represents the effective length of the character string. The length field can be signed or unsigned. The second item is a PIC X(n) data type, where n is an integer representing the length of the field that holds the data.
  • SQL statements must reference the group name.
OpenESQL .NET Managed Runtime
OpenESQL .NET Managed Runtime applications have no byte limit. In addition to the definitions valid for OpenESQL, the following definition is also valid for the OpenESQL .NET Managed Runtime:
01 clob3     string.