Character string variables

Character string variables follow specific rules for use in host languages.

  • Fixed-length character string variables can be used in all languages except REXX and Java. In C, CHAR string variables are limited to a length of 1.
  • Varying-length character string variables can be used in all host languages with the following exceptions:
    • Fortran: varying-length non-LOB character strings cannot be used.
    • Assembler, C, and COBOL: varying-length non-LOB strings are simulated as described in DB2 Application Programming and SQL Guide. In C, NUL-terminated strings can also be used.
    • REXX: CLOBs and DBCLOBs cannot be used.