IBM DB2 Manual page 234

Table of Contents

Advertisement

|
| |
|
| | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218
Application Programming Guide and Reference for Java
Constant
com.ibm.db2.jcc.DB2BaseDataSource.JIS
The default is com.ibm.db2.jcc.DB2BaseDataSource.ISO.
decimalRoundingMode
Specifies the rounding mode for decimal floating-point values on DB2 for
z/OS Version 9 or later, or DB2 Database for Linux, UNIX, and Windows
database servers.
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 For DB2 for z/OS or DB2 Database for Linux, UNIX, and Windows
database servers, the rounding mode is ROUND_HALF_EVEN for
decimal floating-point values.
If decimalRoundingMode is set, the decimalRoundingMode value is used to set
the CURRENT DECFLOAT ROUNDING MODE special register on DB2 for
z/OS database servers.
Integer
value
4
Format
yyyy-mm-dd

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents