webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  How to tokenize a postcode string?

    Posted Wed September 20, 2023 10:45 AM

    Product/components used and version/fix level:

    Integration Server 10.5

    Detailed explanation of the problem:

    Hello,

    I’m kinda stuck with an extremely easy task (i can’t believe I’m asking this)

    How can I tokenize a postcode string?

    I want to input 1000-001 so that the output could be:
    PostCode: 1000
    PostCodeExt: 001

    I already make this as a string with built-in flow steps, I’ve tried a bunch of configuration and nothing.

    Can someone help

    Many Thanks

    Error messages / full error message screenshot / log file:

    Question related to a free trial, or to a production (customer) instance?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: How to tokenize a postcode string?

    Posted Wed September 20, 2023 10:57 AM

    You have to set an index on the output links. Then the links turn to blue


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: How to tokenize a postcode string?

    Posted Wed September 20, 2023 11:11 AM

    Hi,

    PostCode will be index=0 and PostCodeExt will then be index=1.

    Regards,
    Holger


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: How to tokenize a postcode string?

    Posted Wed September 20, 2023 11:12 AM

    OMGGGGG!!!

    I can’t believe it…

    Thank you so much!!!

    Have a nice day ! <3


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: How to tokenize a postcode string?

    Posted Wed September 20, 2023 04:12 PM

    Your example here is indeed a simple string, but be aware of the behavior of tokenize when one or more fields are empty. You may want/need to create a new service that uses the String.split method :(you can write a Java service that looks just like tokenize, but works slightly differently).


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services