What's New
Details on running Java programs that access DB2
Universal Database in a double-byte character set (DBCS) environment can be
found at
http://www.software.ibm.com/data/db2/java/dbcsjava.html.
This web page currently contains the following information:
JDBC and SQLJ programs access DB2 using the DB2 CLI/ODBC driver and
therefore use the same configuration file (db2cli.ini). The
following entries must be added to this configuration file if you run Java
programs that access DB2 UDB in a DBCS environment:
- PATCH1 = 65536
- This forces the driver to manually insert a "G" in front of character
literals which are in fact graphic literals. This PATCH1 value should
always be set when working in a double byte environment.
- PATCH1 = 64
- This forces the driver to NULL terminate graphic output strings.
This is needed by Microsoft Access in a double byte environment. If you
need to use this PATCH1 value as well then you would add the two values
together (64+65536 = 65600) and set PATCH1=65600. See Note #2 below for
more information about specifying multiple PATCH1 values.
- PATCH2 = 7
- This forces the driver to map all graphic column data types to char column
data type. This is needed in a double byte environment.
- PATCH2 = 10
- This setting should only be used in an EUC (Extended Unix Code)
environment. It ensures that the CLI driver provides data for character
variables (CHAR, VARCHAR, etc...) in the proper format
for the JDBC driver. The data in these character types will not be
usable in JDBC without this setting.
| Note: |
- Each of these keywords is set in each database specific stanza of the
db2cli.ini file. If you want to set them for multiple databases
then you need to repeat them for each database stanza in
db2cli.ini.
- To set multiple PATCH1 values you add the individual values and use the
sum. To set PATCH1 to both 64 and 65536 you would set PATCH1=65600
(64+65536). If you already have other PATCH1 values set then replace
the existing number with the sum of the existing number and the new PATCH1
values you want to add.
- To set multiple PATCH2 values you specify them in a comma delimited string
(unlike the PATCH1 option). To set PATCH2 values 1 and 7 you would set
PATCH2="1,7"
For more information about setting these keywords see the "Running CLI/ODBC
Programs" section in the Installing and Configuring DB2 Clients manual.
|
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]