Page 1 of 1

Convert string to numeric value

Posted: Wed Apr 01, 2009 8:37 am
by srai
Hi All,

Using execute command activity stage in datastage, i reading a text file which contain the record count. The out put this stage is being treated as string in DataStage while text file contains no only.
Is there any function in DataStage to convert string to numeric value.

For exp- my text contains count as 5000.
I am reading this 5000 using execute command activity (cat Unix command) as passing it as parameter in job to a numeric variable.
At that time job is throwing error as ->
"Loop final value not numeric" (cat: count.txt) I am passing out put of UNIX command Cat count.txt where the file count.txt contains the count no.

Thanks in advance
Santosh

Re: Convert string to numeric value

Posted: Wed Apr 01, 2009 8:42 am
by betterthanever
I this is happening since u have Filed Marks in the Execute Command output...

when assigning the output to the Job parameter, remove the the FM.

Code: Select all

Convert(@FM,'', Execute_Command_7.$CommandOutput)

Posted: Wed Apr 01, 2009 3:34 pm
by ray.wurlod
What U has ought not to concern srai.

The second person personal pronoun in English is spelled "you", not "u". Please strive for a professional standard of English on DSXchange, because even good English is difficult enough for non-native speakers, and also because DSXchange is not an SMS-enabled device.