Previous Topic Next topic Print topic


Large Binary Strings (BLOB)

Large binary string data types (BLOB) are SQL data types that enable you to store large amounts of data, from sources such as JPG files, in binary columns.

Host Variable Formats

OpenESQL and DB2 ECM
01 blob1     SQL TYPE IS BLOB(2M).
  • SQL BINARY, VARBINARY and IMAGE data are represented in COBOL as PIC X (n) fields.
  • OpenESQL does not perform data conversion.
  • When data is fetched from the database, if the host-variable field is smaller than the amount of data fetched, the data is truncated and the SQLWARN1 field in the SQLCA data structure is set to W. If the host-variable field is larger than the amount of data, the field is padded with null (x"00") bytes.
  • Any of the following enable you to insert data into BINARY, VARBINARY or LONG-VARBINARY columns:
    • Use dynamic SQL statements
    • Compile your application with the ALLOWNULLCHAR directive
    • Use SQL TYPE host variables
    • Use JVM Byte host variables
OpenESQL JVM Managed Runtime
In addition to the definitions valid for OpenESQL, the following definition is also valid for the OpenESQL JVM Managed Runtime:
01 blob3     type java.sql.Blob.

OpenESQL JVM Managed Runtime applications have no byte limit.

Previous Topic Next topic Print topic