Originally posted by: SystemAdmin
I'm not clear on what you are trying to do. Is "Good: 18 / Bad: 0" a text string that you are trying to convert to "18"?
If so, there are several ways of doing it using the built in WTX functions.
Here's one possibility: =SUBSTITUTE(TRIMRIGHT(WORD(In1, "/", 1)), "Good: ", "")
-
where In1 represents the value of the input string - "Good: 18 / Bad: 0"
-
the WORD function gets part 1 of the string to the left of "/", returning "Good: 18 "
-
the TRIMRIGHT function removes trailing spaces, returning "Good: 18"
-
the SUBSTITUTE function replaces "Good: " with "", returning "18".
If you are trying to return a count of good and bad records extracted from a file or database then you would use the COUNT() function around EXTRACT() or whatever function you used to return good records.
#IBMSterlingTransformationExtender#DataExchange#IBM-Websphere-Transformation-Extender