Page 1 of 1

decimal to higher decimal field mapping error

Posted: Wed Oct 19, 2011 8:12 am
by marchana
Hi,

I tried to load data by simple direct mapping.

source column a (decimal(17,2))-12121212121212121.66

target column b (decimal(17,5))

The data are rejected to peak stage if i mapped directly. So i used DecimalToDecimal function , but that one also not worked.The data got loaded into DB2 target table but the value is 000000000000000.00.

Can anyone help me to rectify this asap? Thanks in advance.

Posted: Wed Oct 19, 2011 8:17 am
by ShaneMuir
In datastage 17,2 doesn't mean 17 numbers +2 decimal places. It means that you get 17 places, 2 of which are decimals. Try increasing the values in the jobs to 19,2 and 22,5 and see how you get on.

Re: decimal to higher decimal field mapping error

Posted: Wed Oct 19, 2011 11:40 pm
by deeplind07
your data types should be
source column a (decimal(19,2))
target column b (decimal(22,5))

you wont need to use DecimalToDecimal fuction as this will be implicit conversion.

Also you are receiving value as 000000000000000.00, because you must have have set you default value as 0, because the record is getting rejected it is being replaced by default value

Posted: Thu Oct 20, 2011 1:05 am
by marchana
Thanks a lot for your reply.:)

Yesterday itself, i found that it is data issue only. i forgot to think in that way previously. Sorry for the late reply.