ALLOWNULLCHAR

Allows programs to use PIC X(n) host variables, and to select/insert/update the null character (x00) into CHAR columns without changing source to use SQL TYPE BINARY host variables.

Syntax:

Important: Use ALLOWNULLCHAR with legacy code only, for example, code that uses FOR BIT DATA columns in DB2 (now discouraged by IBM) where the cost of converting to BINARY columns in the database and SQL TYPE IS BINARY host variables is prohibitive. Storing binary data in character columns is not a best practice and should be avoided wherever possible.
[NO]ALLOWNULLCHAR

Properties:

Default: NOALLOWNULLCHAR

Scope:

Used at compile time: No
Behavior at run time: Process

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comments:

With ALLOWNULLCHAR, OpenESQL does not truncate the contents of the input host variable when the first embedded NULL character is encountered.

With NOALLOWNULLCHAR, however, the database is presented a truncated value, including all characters up to the first embedded NULL.

PostgreSQL does not support the embedding of the NULL character into CHAR columns; therefore ALLOWNULLCHAR is not supported in PostgreSQL OpenESQL applications.