Value rounded before is loaded in Oracle table field

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Value rounded before is loaded in Oracle table field

Post 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
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post 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
Locked