decimal to higher decimal field mapping error

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
marchana
Participant
Posts: 18
Joined: Tue Jul 13, 2010 2:32 am

decimal to higher decimal field mapping error

Post 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.
ShaneMuir
Premium Member
Premium Member
Posts: 508
Joined: Tue Jun 15, 2004 5:00 am
Location: London

Post 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.
deeplind07
Participant
Posts: 31
Joined: Mon Jun 28, 2010 5:15 am
Location: pune

Re: decimal to higher decimal field mapping error

Post 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
marchana
Participant
Posts: 18
Joined: Tue Jul 13, 2010 2:32 am

Post 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.
Post Reply