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.


#TechXchangePresenter
 View Only
  • 1.  Creating a filename from 2 variables, through concatenation.

    Posted Wed April 22, 2009 10:51 AM

    I have 2 variables filename and extension. i need to create a full filename from it. the problem i am facing is that, is it possible to concatenate 3 objects together??

    For e.g. the filename, a dot and the extension.

    Cause i am only able to concatenate only the filename and extension.

    And also is it possible to reverse the situation, that is take the full filename and make split it into 2 parts, removing the dot also.

    please help!


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


  • 2.  RE: Creating a filename from 2 variables, through concatenation.

    Posted Wed April 22, 2009 11:47 AM

    You can use variable substitution: For inString1 pass filename. For inString2 initialize a value .%extension% and check ‘Perform variable substitution’ option.
    Or invoke pub.string:concat service more times until u get the string u want.
    Pls go though the built-in services guide.

    Cheers
    Guna


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


  • 3.  RE: Creating a filename from 2 variables, through concatenation.

    Posted Thu April 23, 2009 06:50 PM

    There are also some PSUtilities available to perform these functions. You can use PSUtilities.string:multiConcat to concatinate several values together.

    PSUtilities.regex:split can be used to search for a decimal point and return the values to the left and right of it in a sting list.


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


  • 4.  RE: Creating a filename from 2 variables, through concatenation.

    Posted Tue August 18, 2009 12:42 PM

    Either as gunasekhar says, use variable substitution, or use two or more concat calls to build the resulting string. The latter is probably a bit less efficient.

    To split, use tokenize in WmPublic package.


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


  • 5.  RE: Creating a filename from 2 variables, through concatenation.

    Posted Thu August 27, 2009 03:40 PM

    Hi Assad,

    Please make use of pub.string:makeString.
    For e.g. you want to perform the following operation : “windows.txt”.
    Here Filename : windows
    dot : .
    extension : txt
    Then first declare 3 variables i.e filename , dot(setvalue to .) , extension(setValue to txt)
    Then use pub.string:makeString and Map in the order which you want.
    First Map variable filename to “elementList” and give indices… set to “0” since FlieName come first.
    Then Map variable dot to “elementList” and give indices… set to “1” since dot comes next and then Map variable extension to “elementList” and give indices… set to “2”.

    Then run it which gives windows.txt.

    Try to change indices and observe the output.

    Thanks ,
    Sudheer Martha


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