Previous Topic Next topic Print topic


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.
Previous Topic Next topic Print topic