OpenESQL

SQL BINARY, VARBINARY and IMAGE data are represented in COBOL as PIC X (n) fields. No data conversion is performed. When data is fetched from the database, if the COBOL field is smaller than the amount of data, the data is truncated and the SQLWARN1 field in the SQLCA data structure is set to "W". If the COBOL field is larger than the amount of data, the field is padded with null (x"00") bytes. To insert data into BINARY, VARBINARY or LONG VARBINARY columns, you must either use dynamic SQL statements, or compile your application with SQL directive ALLOWNULLCHAR, or use SQL TYPE host variables. For more information, see the OpenESQL SQL TYPEs in this chapter. OpenESQL only supports a maximum of 65000 character per host variable.