Page 1 of 1

Value rounded before is loaded in Oracle table field

Posted: Thu Jul 05, 2001 3:54 pm
by admin
Hi to the reader!

I have problem loading data in a Oracle table field.

The value from the source field of a text file contain a number, with 19 digits and I divide it by 100000000 before load it in a Decimal Oracle Table field with Length 19 and Scale 8. Executing this process I found in the Output field that
the value is rounded at the fourth Decimal and I need to hold the complete set of decimal number. Also debugging this process Ive checked that the output value of Transformer stage is already rounded.

Im running DS 4.0 on AIX. But ive tested this problem also on DS 4.1 on NT with Oracle 8.1.6.

Does anybody knows the reason?

Thanx

Giovanni Boccia
Sales Engineer
Direzione Industria e Servizi
Datamat - Enabling Your Future
Via Laurentina, 760
00143 Roma - Italy

Posted: Thu Jul 05, 2001 10:50 pm
by admin
The reason is the internal behaviour of the DataStage engine (UniVerse), which by default rounds at the fourth decimal place when an arithmetic result is used in a string context (such as during I/O). This behaviour can be changed in BASIC code by using the PRECISION m declaration, where m is the desired number of decimal places (0