Compatibility of Decimal value between Hashed File and UV

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
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Compatibility of Decimal value between Hashed File and UV

Post by vnspn »

Hi,

We are working in version 7.1 on Windows. We would like to know if there are any known compatibility issue of 'Decimal' values between Hashed File stage and UniVerse stage.

We write data to a Hashed File where the metadata for a column is Decimal(9,6). A sample value written to this column is 75. When we give View Data, we are able to see the correct value '75'.

we read the same hashed file from an UniVerse stage using the same metadata [Decimal(9,6)]. But when we use View Data, it shows a message that the "Expected = Decimal and Actual = Numeric", though it was written as a Decimal value. And also the value is shows after this message is "0.000075". It adds 6 decimal places to the actual value.

Is there any compatibility probelm between a Hahsed File stage and an UniVerse stage for a Decimal value been identified?

Thanks.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Life is easier when you make it a varchar then it does not change it.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you write the value using a UniVerse stage, or using a Hashed File stage?

Writing using a Hashed File stage and reading using a UniVerse stage can cause the scale to be interpreted as a "scaling factor".

UniVerse tables treat Numeric and Decimal identically, but for some reason always throw this warning if your metadata specifies Decimal. Import the table definition from the UniVerse table - you will get Numeric.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Post by vnspn »

I write the value using a Hashed File stage and read it through a UniVerse stage.

So, you mean that in this kind of scenario, we will be getting this warning message whenever we make use of a Decimal column.

So, does it mean that I should try avoiding making use of Decimal datatype wherever I write to a Hashed File read it using UniVerse stage?
vnspn
Participant
Posts: 165
Joined: Mon Feb 12, 2007 11:42 am

Post by vnspn »

I had this issue resolved.

While writing to the Hashed File stage, I checked the option "UniVerse Stage Compatibility" in the Stage properties. Then, when I read it using a UniVerse stage, it reads the Decimal fields correctly.

Thanks.
Post Reply