Xfm,0: Numeric string expected for returned value from funct

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
Kshitij Rawat
Participant
Posts: 68
Joined: Wed Jan 10, 2007 11:24 pm

Xfm,0: Numeric string expected for returned value from funct

Post by Kshitij Rawat »

When I used TrimLeadingTrailing function for any any nullable column like TrimLeadingTrailing(toXfm.Employee_discripion) I got the below message.

"Xfm,0: Numeric string expected for returned value from function call 'substring_1'. Use default value."

This is not a warning message but why I am getting this?

Or please tell me where I should use TrimLeadingTrailing.TrimF,TrimB,Trim functions ?
Most of the time when column is nullable this is my approach in transformer

If TrimLeadingTrailing(toXfm.Employee_discripion)='' Then SetNull() Else TrimLeadingTrailing(toXfm.Employee_discripion).
This ok for you or should I need to change.

Thanks.
[/b]
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Re: Xfm,0: Numeric string expected for returned value from f

Post by priyadarshikunal »

Kshitij Rawat wrote:When I used TrimLeadingTrailing function for any any nullable column like TrimLeadingTrailing(toXfm.Employee_discripion) I got the below message.

"Xfm,0: Numeric string expected for returned value from function call 'substring_1'. Use default value."

This is not a warning message but why I am getting this?

Or please tell me where I should use TrimLeadingTrailing.TrimF,TrimB,Trim functions ?
Most of the time when column is nullable this is my approach in transformer

If TrimLeadingTrailing(toXfm.Employee_discripion)='' Then SetNull() Else TrimLeadingTrailing(toXfm.Employee_discripion).
This ok for you or should I need to change.

Thanks.
[/b]
this message comes when the value passed by you in transformer is not appropriate
e.g. in transformer if you try to pass empty character or space to a numeric field it will be replaced by 0 by default

this results in to the message you got

the best way is to perform a comparison between source and target
and analyze the values that are replaced by 0 for string its null.

i think this will resolve your problem

Regards,
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Kshitij Rawat
Participant
Posts: 68
Joined: Wed Jan 10, 2007 11:24 pm

Re: Xfm,0: Numeric string expected for returned value from f

Post by Kshitij Rawat »

But if i used Trim function definitely it will remove space or any unwanted value so why I am getting this message?
ETL DEVELOPER

Watch The Time Cycle, You Will Have All Answers.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Your problem is not in the trim() you posted. It is somewhere else where you are performing a numeric operation on a value that is not numeric.
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post by AmeyJoshi14 »

:idea: You can use ISNotNull() function in transformer....
So your code will be like this...

Code: Select all

IF
IsNotNull(toXfm.Employee_discripion)
THEN
TrimLeadingTrailing(toXfm.Employee_discripion)
ELSE
SetNull()
This will remove the message...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Trim... functions can only be applied to string data types. They can not be applied to numeric data types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Kshitij Rawat
Participant
Posts: 68
Joined: Wed Jan 10, 2007 11:24 pm

Post by Kshitij Rawat »

Thanks all.
ETL DEVELOPER

Watch The Time Cycle, You Will Have All Answers.
rajkraj
Premium Member
Premium Member
Posts: 98
Joined: Wed Jun 15, 2005 1:41 pm

Post by rajkraj »

How,was this resolved.

Thanks
Post Reply