IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Mapping Help

    Posted 10/14/09 10:12 AM

    Originally posted by: MyScreen-Laks


    Can someone help me out here?

    My input is like:
    Good: 18 / Bad: 0

    Output should be 18
    I always want to extract only good records count. They both are text fields. Please advice.

    Thanks,
    Laks
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Mapping Help

    Posted 10/14/09 10:52 AM

    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


  • 3.  Re: Mapping Help

    Posted 10/15/09 05:41 AM

    Originally posted by: TarunB


    "I always want to extract only good records count"

    Try COUNTABS()
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: Mapping Help

    Posted 10/15/09 05:44 AM

    Originally posted by: TarunB


    Sorry that should have been COUNT() but I can't believe you haven't tried this already. Maybe we're not understanding the detailed requirements you specified.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 5.  Re: Mapping Help

    Posted 10/15/09 05:46 AM

    Originally posted by: TarunB


    Damn where's that Edit Post functionality?

    Third time lucky : I agree with Mike's post.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: Mapping Help

    Posted 10/15/09 09:25 AM

    Originally posted by: MyScreen-Laks


    Hi Mike, You are right. It works like a charm.

    Thanks for all your help.

    -Laks
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender