IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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
Expand all | Collapse all

Removing TOKENS

  • 1.  Removing TOKENS

    Posted Thu December 08, 2005 07:06 PM

    Hi,
    Does anyone knows if it is possible to eliminate token 0 at all times? I am getting header info in token 0 that is creating unnecessary file.
    Or
    Does anyone know how I can always remove line number 1 from the input string?

    Thank You,
    Sebastian


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


  • 2.  RE: Removing TOKENS

    Posted Thu December 08, 2005 07:51 PM

    Sebastian,

    Sending the sample flow.It only removes the first H entry.If there are any H entries in the middle, then it doesn’t work.

    HTH
    ramesh


    TokenRemove.zip (4.3 k)


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


  • 3.  RE: Removing TOKENS

    Posted Thu December 08, 2005 08:39 PM

    Ramesh,

    I used the tokenValue and mapped it to fileContent in wroteToFile. But I am still getting extra file with the H<header> info. The tokenValue should now hold the value of each token after it was split by the delimiter. So it should only output tokens without the first one. Correct?

    Sebastian


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


  • 4.  RE: Removing TOKENS

    Posted Thu December 08, 2005 08:56 PM

    Sebastian,

    Did you use the $iteration variable anywhere?If not use it as it is in the sample and include the writeToFile and now map the tokenValue to the fileContent.It should work.

    HTH
    ramesh.


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


  • 5.  RE: Removing TOKENS

    Posted Thu December 08, 2005 08:58 PM

    Sebastian,

    After splitting,the first token is also inculded.In order to exclude it,you have to use the $iteration variable and if it is equal to 1, do nothing,else,Write the TokenValue to a file.

    ramesh.


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


  • 6.  RE: Removing TOKENS

    Posted Thu December 08, 2005 09:10 PM

    I have mapped the tokenValue to fileContent. Am I missing something?

    Sebastian

    pckg
    TOKEN_TEST.zip (5.6 k)


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


  • 7.  RE: Removing TOKENS

    Posted Thu December 08, 2005 09:21 PM

    Ramesh, I was playing around with it and I must changed something b/c now its working. :slight_smile: So far so good! Now I have to incorporate this whole thing into another pckg. Thank you for the help! :slight_smile:


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


  • 8.  RE: Removing TOKENS

    Posted Thu December 08, 2005 09:52 PM

    Ramesh, I guess I have one small issue. After I added your solution I am getting the new tokens correctly in the toList. Then I am looping thru toList and I am writing the contents to a file. Example I have only 2 tokens the loop is looping twice thru the toList which is correct but is writing the same token twice in two different files. It should write token one and then token two. Can’t figure out why token 2 is not being written?

    LOOP over /valueList
    -Branch
    –SEQ %$iteration%!=1
    —MAP
    —appendToStringList
    LOOP over /toList
    -getCurrentDateString
    -writeToFile


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


  • 9.  RE: Removing TOKENS

    Posted Thu December 08, 2005 10:21 PM

    Ok I figured it out. I made a change:

    LOOP over /valueList
    -Branch
    –SEQ %$iteration%!=1
    —MAP
    —appendToStringList
    —getCurrentDateString
    —writeToFile

    I had to drop toList in the writeToFile and now I am getting correct files.


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