IBM DB2 Manual page 258

Table of Contents

Advertisement

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242
Application Programming Guide and Reference for Java
db2.jcc.decimalRoundingMode or db2.jcc.override.decimalRoundingMode
Specifies the rounding mode for decimal or decimal floating-point values on
DB2 for z/OS or DB2 Database for Linux, UNIX, and Windows database
servers, and for decimal values on all other data sources that support the
decimal data type.
Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.ROUND_DOWN (1)
Rounds the value towards 0 (truncation). The discarded digits are
ignored.
com.ibm.db2.jcc.DB2BaseDataSource.ROUND_CEILING (2)
Rounds the value towards positive infinity. If all of the discarded digits
are zero or if the sign is negative the result is unchanged other than
the removal of the discarded digits. Otherwise, the result coefficient is
incremented by 1.
com.ibm.db2.jcc.DB2BaseDataSource.ROUND_HALF_EVEN (3)
Rounds the value to the nearest value; if the values are equidistant,
rounds the value so that the final digit is even. If the discarded digits
represents greater than half (0.5) of the value of one in the next left
position then the result coefficient is incremented by 1. If they
represent less than half, then the result coefficient is not adjusted (that
is, the discarded digits are ignored). Otherwise the result coefficient is
unaltered if its rightmost digit is even, or is incremented by 1 if its
rightmost digit is odd (to make an even digit).
com.ibm.db2.jcc.DB2BaseDataSource.ROUND_HALF_UP (4)
Rounds the value to the nearest value; if the values are equidistant,
rounds the value away from zero. If the discarded digits represent
greater than or equal to half (0.5) of the value of one in the next left
position then the result coefficient is incremented by 1. Otherwise the
discarded digits are ignored.
com.ibm.db2.jcc.DB2BaseDataSource.ROUND_FLOOR (6)
Rounds the value towards negative infinity. If all of the discarded
digits are zero or if the sign is positive the result is unchanged other
than the removal of discarded digits. Otherwise, the sign is negative
and the result coefficient is incremented by 1.
com.ibm.db2.jcc.DB2BaseDataSource.ROUND_UNSET (-2147483647)
No rounding mode was explicitly set. The IBM Data Server Driver for
JDBC and SQLJ does not use the decimalRoundingMode to set the
rounding mode on the data source.
The IBM Data Server Driver for JDBC and SQLJ uses the following
values for its rounding mode:
v If the data source is DB2 for z/OS or DB2 Database for Linux,
UNIX, and Windows, the rounding mode is ROUND_HALF_EVEN
for decimal or decimal floating-point values.
v For any other data source, the rounding mode is ROUND_DOWN
for decimal values.
db2.jcc.defaultSQLState
Specifies the SQLSTATE value that the IBM Data Server Driver for JDBC and
SQLJ returns to the client for SQLException or SQLWarning objects that have null
SQLSTATE values. This configuration property can be specified in the
following ways:

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents