CLOB and BLOB data types

In addition to the TEXT and BYTE data types (known as Simple Large Objects), IBM® Informix® servers support the CLOB and BLOB types to store large objects. CLOB/BLOB are known as Smart Large Objects. The main difference is that Smart Large Objects support random access to the data - seek, read and write through the LOB as if it was an OS file.

Genero BDL does not support the CLOB and BLOB types:

  • It is not possible to define BDL variables with the CLOB or BLOB types, so you cannot manipulate CLOB/BLOB objects within programs.
  • Defining a TEXT / BYTE variable to hold CLOB / BLOB column data is not supported; you will get error -609 (Illegal attempt to use a Text/Byte host variable).
  • The static SQL syntax for DDL statements like CREATE TABLE does not allow the CLOB / BLOB keywords for column types.
  • The fgldbsch schema extractor will report an invalid data type if you try to get the schema for a table with a CLOB or BLOB column.

You can, however:

  • Create a table with CLOB/BLOB columns by using Dynamic SQL.
  • Use the Smart Large Object functions FILETOBLOB(), FILETOCLOB(), LOCOPY(), LOTOFILE() in static SQL statements.

Enhancement reference: 476