Admin Production rocket
Current Publication

Compiling DB2 Programs with HCO

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.

Compiling DB2 Programs with HCO

The DB2 External Compiler Module allows programs checked with CHARSET(EBCDIC) directive to access SQL tables using DB2 LUW. The DB2 ECM generates code to convert all character data (columns defined as CHAR or VARCHAR) from EBCDIC to ANSI before storing it in DB2 LUW tables and conversely converts it from ANSI to EBCDIC on all retrievals from DB2 LUW tables.

This means that other products such as Microsoft Excel can still be used to access data stored in the tables.

Note: If your application contains character columns defined as FOR BIT DATA, and the data stored in the columns is not ANSI, you must define the host variable with the DECLARE hostVariableName FOR BIT DATA statement. Otherwise, the results are unpredictable.