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.  CSV FF- Remove Empty Lines

    Posted 10/30/18 04:04 AM

    Hi guys,

    How to remove empty lines in the CSV FF, if it comes in the middle ?

    For example:

    there are 4 rows.

    A,B,C,D=>Row#:1
    A,B,C,D=>Row#:2
    A,B,C,D=>Row#:3

    A,B,C,D=>Row#:4

    If you see that, there is an empty line between Row#:3 & Row#:4

    I can check null or blank using loop. I don’t want to check it inside loop.

    During FF conversion itself, I would want to remove the empty lines.

    Could you please help me to remove the empty lines?


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


  • 2.  RE: CSV FF- Remove Empty Lines

    Posted 10/31/18 11:41 AM

    Hello,

    To me, you can write a java service to remove the empty lines after loading the file into integration server. Then, you can use the convertToValues service to parse its content.

    Regards
    Sasa


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


  • 3.  RE: CSV FF- Remove Empty Lines

    Posted 11/01/18 09:23 PM

    You really don’t need a java class to do this as it can be done via “pub.string:replace” with the use of regex. Try this out.

    searchString=(?m)[1]*\r?\n
    useRegex=true


    1. \t ↩︎


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


  • 4.  RE: CSV FF- Remove Empty Lines

    Posted 11/01/18 11:46 PM

    You really don’t need a java class to do this as it can be done via “pub.string:replace” with the use of regex. Try this out.

    searchString=(?m)[1]*\r?\n
    useRegex=true

    [/quote]

    HI Mahesh,

    I just tried it now but it did not work out…
    Could you please help me further?


    1. \t ↩︎


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


  • 5.  RE: CSV FF- Remove Empty Lines

    Posted 11/02/18 12:14 AM

    Strange! I tried on my machine before posting it, can you attach a sample package or the FF string here.

    Try to check the regex expression and extend it as per your FF content, there might be multiple line breaks.


    1. \t ↩︎


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


  • 6.  RE: CSV FF- Remove Empty Lines

    Posted 12/01/18 09:36 AM

    Yes, there are multiple line breaks…
    Need to modify regex for the multiple line breaks


    1. \t ↩︎


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


  • 7.  RE: CSV FF- Remove Empty Lines

    Posted 07/09/19 05:16 AM

    Hi All,

    I just used pub.string:replace service with below inputs.

    It works as expected even with multiple line breaks

    inString:
    A,B,C,D
    A,B,C,D

    A,B,C,D

    A,B,C,D

    searchString: \n\s
    useRegex: true
    value:
    A,B,C,D
    A,B,C,D
    A,B,C,D
    A,B,C,D


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