Warning during execution of StringToDecimal Function

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

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

Post by ArndW »

kumar_s wrote:
ArndW wrote:
kumar_s wrote:Trim also works for Char...
Kumar, what does TRIM() on a CHAR(10) field containing "hello " return?
For a char field Len(Trim(field_name)) will return the count without whitspace.
Kumar, doing a "LEN(<char field>)" does an implicit conversion to VarChar, which is why it works. A Char column has no length apart from it's defined maximum.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

As that may be true, as mention if Trim used on a char field with the APT_STRING_PADCHAR as 0x0 you can find the ascii null instead of spaces.
Where as if you map the char field directly to a varchar field, you will still get the spaces.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Madhu1981
Participant
Posts: 69
Joined: Wed Feb 22, 2006 7:49 am

Warnings during the execution of StringToDecimal Function

Post by Madhu1981 »

kumar_s wrote:The option available in transformer (Also available project level).
If enabled, DataStage tries to combine all possible orchestrate operator to a single operator while compiling to reduce the over head.
Though the funcitons are given in an order, which should also work according to its own precedence, sometimes the trim and the StringToDecimal conversion may get combined. Hence it may work in other order.
Hi Kumar,

I made Combinability Mode to fasle. Previously the error was

APT_CombinedOperatorController,0: A numeric string was expected, got "101 "; using Decimal, the default value.After making to false it is giving like
Transformer_3,0: A numeric string was expected, got "101 "; using Decimal, the default value.

Kindly help me
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

For testing purpose, just try to use Trim(Feild_Name).
And verify whether you get "101 " (A trailing space ).
Have you used any NLS mapping?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSkkk
Charter Member
Charter Member
Posts: 70
Joined: Fri Nov 05, 2004 1:10 pm

Re: Warnings during the execution of StringToDecimal Functio

Post by DSkkk »

Madhu1981 wrote:
kumar_s wrote:
I made Combinability Mode to fasle. Previously the error was

APT_CombinedOperatorController,0: A numeric string was expected, got "101 "; using Decimal, the default value.After making to false it is giving like
Transformer_3,0: A numeric string was expected, got "101 "; using Decimal, the default value.

Kindly help me
Madhu -
Were you able to figure out and overcome the warning. If so can u pls post what the solution was as it would be helpful in correcting the issue we are having currently.

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

Post by ray.wurlod »

If Madhu has a solution why do you want U to post what the solution was?
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