I want to Convert string to real number

I am new to webMethods. I am practicing building programs based on MRS sheets for B2B.
in one condition I want to convert string to real number.

I don’t know how exactly to achieve this. I am trying getting values in numeric format in result section but when i write it to the file itshows in following form (5E0) while exact value is 5.0

Hi @aaditya_chandras
It is not clear which are the products/ services that you are using to convert a string to a number.
Please provide more details as mentioned in the question template such as

  • Product/components used and version/fix level: The behavior can vary slightly between different versions. Best to mention exact version/fix levels.
  • Detailed explanation of the problem: Please provide a sample flow, that would help in diagnosing the problem faster. How is the data parsed and how is it written to file , etc

There are public services in the WmPublic , refer Built in services guideto loop over documents and convert a string to a number and can write this data to files, you could give them a try.



What service are you using to convert the string? If this string value is just going to be written to a delimited file, seems like there is no need to convert it to a number object.

FYI, avoid the pub.math:*floats services – floating point arithmetic is to be avoided when accuracy is needed (almost always :slight_smile: ) Those services have been tweaked over the years to try to be better, but they still have cases where there are undesired results returned. (EDIT: not a bug – it is the nature of floating point arithmetic.)

Are you using WmEDI? How was data generated originally?