IBM DB2 Manual page 248

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232
Application Programming Guide and Reference for Java
character input data to the CCSID of the DB2 for z/OS database server, or
sends the data in UTF-8 encoding for conversion by the database server.
sendCharInputsUTF8 applies to IBM Data Server Driver for JDBC and SQLJ
type 2 connectivity to DB2 for z/OS database servers only. The data type of
this property is int. If this property is also set at the driver level
(db2.jcc.sendCharInputsUTF8), this value overrides the driver-level value.
Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.NO (2)
Specifies that the IBM Data Server Driver for JDBC and SQLJ converts
character input data to the target encoding before the data is sent to
the DB2 for z/OS database server.
com.ibm.db2.jcc.DB2BaseDataSource.NO is the default.
com.ibm.db2.jcc.DB2BaseDataSource.YES (1)
Specifies that the IBM Data Server Driver for JDBC and SQLJ sends
character input data to the DB2 for z/OS database server in UTF-8
encoding. The database server converts the data from UTF-8 encoding
to the target CCSID.
Specify com.ibm.db2.jcc.DB2BaseDataSource.YES only if conversion to
the target CCSID by the SDK for Java causes character conversion
problems. The most common problem occurs when you use IBM Data
Server Driver for JDBC and SQLJ type 2 connectivity to insert a
Unicode line feed character (U+000A) into a table column that has
CCSID 37, and then retrieve that data from a non-z/OS client. If the
SDK for Java does the conversion during insertion of the character into
the column, the line feed character is converted to the EBCDIC new
line character X'15'. However, during retrieval, some SDKs for Java on
operating systems other than z/OS convert the X'15' character to the
Unicode next line character (U+0085) instead of the line feed character
(U+000A). The next line character causes unexpected behavior for some
XML parsers. If you set sendCharInputsUTF8 to
com.ibm.db2.jcc.DB2BaseDataSource.YES, the DB2 for z/OS database
server converts the U+000A character to the EBCDIC line feed
character X'25' during insertion into the column, so the character is
always retrieved as a line feed character.
Conversion of data to the target CCSID on the database server might
cause the IBM Data Server Driver for JDBC and SQLJ to use more
memory than conversion by the driver. The driver allocates memory
for conversion of character data from the source encoding to the
encoding of the data that it sends to the database server. The amount
of space that the driver allocates for character data that is sent to a
table column is based on the maximum possible length of the data.
UTF-8 data can require up to three bytes for each character. Therefore,
if the driver sends UTF-8 data to the database server, the driver needs
to allocate three times the maximum number of characters in the input
data. If the driver does the conversion, and the target CCSID is a
single-byte CCSID, the driver needs to allocate only the maximum
number of characters in the input data.
sqljEnableClassLoaderSpecificProfiles
Specifies whether the IBM Data Server Driver for JDBC and SQLJ allows using
and loading of SQLJ profiles with the same Java name in multiple J2EE
application (.ear) files. The data type of this property is boolean. The default is
false. sqljEnableClassLoaderSpecificProfiles is a DataSource property. This
property is primarily intended for use with WebSphere Application Server.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents