Truncation of opaque-type data

If you specify a host variable that is not large enough to hold the full return value from the server, HCL OneDB™ ESQL/C normally truncates the data to fit the host variable and puts the actual length in an indicator variable.

This indicator variable can be one that you explicitly provide or, for dynamic SQL, one of the following fields of a dynamic-management structure.
Dynamic-management structure
Indicator field
system-descriptor area
INDICATOR field of an item descriptor
sqlda structure
sqlind field of an sqlvar_struct structure

However, these indicator fields are defined as a short integer and therefore can only store sizes up to 32 kilobytes.

This size limitation of the indicator field affects how HCL OneDB ESQL/C handles truncation of opaque-type data that is larger than 32 KB. When HCL OneDB ESQL/C receives opaque-type data that is larger than 32 KB and the host variable is not large enough to hold the opaque-type data, HCL OneDB ESQL/C truncates the data to 32 KB. HCL OneDB ESQL/C performs this truncation at 32 kilobytes even if you program a host variable that is larger than 32 KB (but still not large enough for the data).