Numeric host variables
Numeric host variables can be defined in all languages with a few exceptions.
Binary integer variables can be defined in all host languages.
Floating-point variables can be defined in all host languages. All languages, except Java™, support System/390® floating-point format. Assembler, C, C++, PL/I, and Java also support IEEE floating-point format. In assembler, C, C++, and PL/I programs, the SQL processing option FLOAT tells Db2 whether floating-point variables contain data in System/390 floating-point format or IEEE floating-point format. The contents of floating-point host variables must match the format that is specified with the FLOAT SQL processing option.
Decimal variables can be defined in all host languages except Fortran.
- Packed decimal format, denoted by USAGE PACKED-DECIMAL or COMP-3
- External decimal format, denoted by USAGE DISPLAY with SIGN LEADING SEPARATE
- NATIONAL decimal format denoted by USAGE NATIONAL and SIGN LEADING SEPARATE
Decimal floating-point variables can be defined in Assembler, C, C++, PL/I, and Java.