StringToDecimal function - producing warnings

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
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

StringToDecimal function - producing warnings

Post by Titto »

Hi,

I am getting following error in one my job, the same job ran fine in other DS environment with out any error with same data - what could be the reason.
Operating system AIX 5.0 in both DS environments.

Code: Select all

Conversion error calling conversion routine decimal_from_string data may have been lost
Any info/help is appreciated!

~t
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What is the string contents and what is the decimal column definition. Have you checked the other environment to see if you have a message handler set for that that job?
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

Hi Arndw,

verified other environments, there are not message handlers for those warnings.

basically in those jobs programmer converting a Varchar field to a Number value using StringToDecimal function but we changed that process to use AsInteger function as we know that the source data will have numeric values.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check the data types, in particular the string length (or max length) and the decimal precision and scale. Are these the same in both environments?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Umberto
Participant
Posts: 11
Joined: Mon Apr 23, 2007 6:10 am

Post by Umberto »

Try "StringToDecimal(Trim(InputField))".......
thuan
Participant
Posts: 4
Joined: Wed Jan 08, 2003 3:58 am

input check

Post by thuan »

You also need to check whether the input is not blank or not is null.
The warning is saying that you are applying the function on non numeric varchar.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No it isn't. It's saying that there are too many digits in the value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply