Admin Production rocket
Current Publication

ALLOWNULLCHAR

Enterprise Developer for Eclipse (including UNIX Components) V7.0
Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.

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.