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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Insert carriage return when concatinating strings

    Posted 07/02/03 08:23 PM

    How can you append a carriage return to the end of the string. Is there a way to perform a set value on a variable where the literal is equal to a carriage return, like “/r/n”?


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


  • 2.  RE: Insert carriage return when concatinating strings

    Posted 07/02/03 11:36 PM

    End of line in Java is ‘\n’.

    Try hunting for it using pub.string:replace, turning the reg exp functionality on.


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


  • 3.  RE: Insert carriage return when concatinating strings

    Posted 07/03/03 12:13 AM

    > a way to perform a set value on a variable where the literal is
    > equal to a carriage return, like “/r/n”?

    Hmm, since you’re setting the variable in a flow, just right click and choose “Use Larger Editor”. Then you press “Enter” in the large text box that pops up. This will probably set the output to “\n” since that’s Java’s newline character as Nick says.

    If you want to set it to “\r\n”, you probably need a Java service - pub.string:replace only recognizes \r\n regular expressions in its input.


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


  • 4.  RE: Insert carriage return when concatinating strings

    Posted 07/03/03 03:39 PM

    right click and choose “Use Larger Editor”. Then you press “Enter” in the large text box that pops up. It will definately work.


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


  • 5.  RE: Insert carriage return when concatinating strings

    Posted 07/03/03 03:53 PM

    This will work only for windows though.
    Thanks


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


  • 6.  RE: Insert carriage return when concatinating strings

    Posted 07/03/03 07:08 PM

    I used: URLDecode with input “%0D%0A” the output variable will contain the CRLF pair.

    Depending on requirements, use concat to append to a string.


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


  • 7.  RE: Insert carriage return when concatinating strings

    Posted 07/06/03 02:39 AM

    > I used: URLDecode with input “%0D%0A”
    > the output variable will contain the CRLF pair.

    A generic solution! Very nice lateral thinking.


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


  • 8.  RE: Insert carriage return when concatinating strings

    Posted 07/07/03 05:00 PM


  • 9.  RE: Insert carriage return when concatinating strings

    Posted 12/22/16 06:08 AM

    URLDecode with input “%0D%0A” the output variable will contain the CRLF pair.

    This works for me also…
    Thanks Fosterb. :slight_smile:


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