SQL Strings
Define the variable name used for a SQL string as either a character or varying character type. See “Host Variable Declaration” on page 116 for details on declaring character fields.
PP2 expects a terminating null character (a ‘\0’) if a character string variable is used as a SQL string. The code is generated based on the presence of the ‘\0’ in the string.
The ‘\0’ is not used, however, when a varying character variable is used as a SQL string. Use of a character string variable as a SQL string is a PP2 extension over DB2 rules, although any DB2 conforming SQL string is valid.