Conversion from string to decimal

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
coolbin81
Participant
Posts: 6
Joined: Wed Oct 04, 2006 2:50 pm

Conversion from string to decimal

Post by coolbin81 »

Hi all,

In one of my jobs, i am converting a field from string to decimal and then using this in the constraint. For eg: StringtoDecimal(Trim(Inputfield)) <> 0.0

I am getting the following warning message in the job:

Conversion error calling conversion routine decimal_from_string data may have been lost

Since there are multiple splits, i won't be able to determine if any records are getting dropped.

Can anyone help me out in resolving this issue and guide me what needs to be done to eliminate this warning?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's an alert, not a warning. When converting from string to decimal rounding may occur. Therefore "rounding errors" may occur. No records will be dropped, but some may incur these rounding issues. Then again, none may - depends on your data. But DataStage always generates the "precision may have been lost" alert message.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
coolbin81
Participant
Posts: 6
Joined: Wed Oct 04, 2006 2:50 pm

Post by coolbin81 »

Thanks Ray.
Post Reply