DB2 precision problem

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

DB2 precision problem

Post by yiminghu »

Hi,

I have a DB2 table, one field in this table is double type. When I dumped this table into file through datastage, it seems it loses precision. For example: a value '3.29999995231628' becomes '3.299999952', even though the column definition is specified as double.

Has anyone evern experienced same situation? What should I do?

Thanks,

Carol
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

This could be due to Operating System restrictions. What OS is on the server? Is Datastage on the same server as DB2?
Cheers,
Dave Nemirovsky
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Post by yiminghu »

djhigh wrote:This could be due to Operating System restrictions. What OS is on the server? Is Datastage on the same server as DB2?
DB2 and Datastage are installed on different servers. The OS is AIX 5.1 and 5.2
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

When viewing the value in the DB2 client the value is: '3.29999995231628'

and then when viewing through datastage it becomes '3.299999952' ?

Try 'Double' as the SQL Type or 'Float' with a Precision value of 14 or greater if required (I believe you can go up to a precision of 308).
Cheers,
Dave Nemirovsky
Post Reply