For binary data items that you specify in an EXEC SQL statement, you can declare the data items as either USAGE COMP-5 or as USAGE BINARY, COMP, or COMP-4.
If you declare the binary data items as USAGE BINARY, COMP, or COMP-4, use the TRUNC(BIN) option and the BINARY(NATIVE) option. (This technique might have a larger effect on performance than using USAGE COMP-5 on individual data items.) If instead TRUNC(OPT) or TRUNC(STD) or both are in effect, the compiler accepts the items but the data might not be valid because of the decimal truncation rules. You need to ensure that truncation does not affect the validity of the data.
related concepts
Formats for numeric data
related references
TRUNC