DB2Z/os V9 binds

IBM's flagship relational database management system

DB2Z/os V9 binds

Postby p19689 » Mon May 16, 2011 9:09 pm

Hi , I need to bind a new package in db2 v9 and would like to maintain the same options as v8 where possible.
1) However , I have noticed that the new V9 bind Option 'ROUNDING' has picked up the default value 'HALFEVEN' . Can anyone advice how this new option (default value) deviate from the V8 , which hasn't had this option ? Basically I am wondering how DB2 handle 'ROUNDING' in V8.

2) Bind option 'DEFERPREP' has been set to 'B' in V9 bind and would like to make it to 'C', similar to V8. If I change 'CURRENTDATA' to 'YES' , will that make the expected out come ?
Posts: 63
Joined: Fri Oct 01, 2010 1:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DB2Z/os V9 binds


Re: DB2Z/os V9 binds

Postby enrico-sorichetti » Mon May 16, 2011 10:15 pm

halfeven is a rounding rule to preserve statistical properties

quoted from wikipedia under the fair use assumption
Round half to even
A tie-breaking rule that is even less biased is round half to even, namely
If the fraction of y is 0.5, then q is the even integer nearest to y.
Thus, for example, +23.5 becomes +24, +22.5 becomes +22, −22.5 becomes −22, and −23.5 becomes −24.
This method also treats positive and negative values symmetrically, and therefore is free of overall bias if the original numbers are positive or negative with equal probability. In addition, for most reasonable distributions of y values, the expected (average) value of the rounded numbers is essentially the same as that of the original numbers, even if the latter are all positive (or all negative). However, this rule will still introduce a positive bias for even numbers (including zero), and a negative bias for the odd ones.
This variant of the round-to-nearest method is also called unbiased rounding (ambiguously, and a bit abusively), convergent rounding, statistician's rounding, Dutch rounding, Gaussian rounding, or bankers' rounding. This is widely used in bookkeeping.
This is the default rounding mode used in IEEE 754 computing functions and operators.

the average of two numbers will be preserved
22.5 ==> 22
23.5 ==> 23
the averages
23 vs. 22.5

half to even
22.5 ==> 22
23.5 ==> 24
the averages
23 vs. 23
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
Global moderator
Posts: 2500
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 119 times

Return to DB2


  • Related topics
    Last post