Using binary items in SQL statements

For binary data items that you specify in an EXEC SQL statement, you can define the data items as either USAGE COMP-5 or as USAGE BINARY, COMP, or COMP-4.

About this task

If you define the binary data items as USAGE BINARY, COMP, or COMP-4, use the TRUNC(BIN) 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) is 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