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

Issue with colon(:) in convertToString when used with quoted release character(")

webMethods Community Member

webMethods Community MemberThu February 16, 2012 05:28 PM

  • 1.  Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Mon February 13, 2012 10:55 PM

    Hi, we are using convertToString, where we are trying to
    create a file with field delimiter as pipe(|) and record delimiter as ‘carriage return’. In the data fields we have | , so we are using quoted release character as ".
    we also have colon(:slight_smile: in data, so whenever we have colon, the convertToString service is enclosing that value in quotes too.

    our input file looks like
    abc|cd:ef|gh|k|lmn

    the result is coming as
    abc|“cd:ef”|“gh|k”|lmn

    the “gh|k” is as expected, but we are also getting quotes for “cd:ef”.

    seems like Integration server is considering : as some field delimiter. any thoughts?


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


  • 2.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Mon February 13, 2012 11:01 PM

    So you want to avoid colon in the data? Probable solution may be try using formatService specification and have the replace function in the particular field that has issue with and check the string output:

    HTH,
    RMG


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


  • 3.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 12:01 AM

    Thanks RMG,
    I want to avoid quotes to the field which has colon :

    I was not expecting quotes to the field “cd:ef”., in above example.Why is IS even enclosing the field cd:ef in quotes when I am not specifying colon anywhere. colon is just part of data.

    will try how to use format servie. Thanks.


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


  • 4.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 04:04 AM

    I suspect that : is defined as a subfield delimiter in the FF schema. It may be a default delimiter. That’s why it is putting the quotes around the data.

    Specify a different subfield delimiter if you want to eliminate the quotes.

    But ultimately, flat file convention is such that the quotes are harmless. They are only an indicator to “treat delimiter chars as literal data”. The quotes are not considered to be part of the data.


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


  • 5.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 04:40 AM

    Thanks Reamon,
    We are not using any subfield delimiter. anway I have to check what a default delimiter is. I understand the quotes will be harmless, but i wonder why it is even putting the quotes if the field has colon in it.


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


  • 6.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 04:41 PM

    Can you share the details of:

    1. The ffSchema being used.
    2. The inputs to the covertToString call.

    Somewhere : is being assumed to be the subfield delimiter. It is there even if you’re not using subfields. That’s why it is putting the quotes.


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


  • 7.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 05:03 PM

    The schema is a delimited one with
    record delimiter as newline
    field delimiter as pipe (|)
    and quoted release character as (")
    and NO subfield delimiter

    The inputs to convertToString are
    ffvalues is a doc
    ffSchmea is the ablove schema name
    Encoding is UTF-8
    returnAsBytes is false

    its all straight forward

    Thanks,


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


  • 8.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 06:31 PM

    Did you try using format Service option?


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


  • 9.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 07:54 PM

    Yes, I tried using the format service, but I dont want to format the value cd:ef to something else, I was expecting the
    value as is in the output without quotes around it. :frowning:

    Thanks,


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


  • 10.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 08:45 PM

    I believe since you have the quoted release character as " in place the convert to string is putting that by default and may be its a bug or any fix to eliminate it or standard output:

    HTH,
    RMG


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


  • 11.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Tue February 14, 2012 10:17 PM

    In the past I’ve experienced that defaults sneak in when you don’t expect them to. Try specifying a subfield delimiter of some sort and see if it still puts quoted release chars around fields with :


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


  • 12.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Wed February 15, 2012 02:59 PM

    Thanks Reamon,RMG
    As you said, looks like colon sneaked in as a subfield delimiter. I specified a different subfield delimiter(say ^), and its working fine now. Is there a way out of this, without explicitly specifying a subfield delimiter.


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


  • 13.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Wed February 15, 2012 03:09 PM

    No other decent way with out it.Glad it worked out for you:


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


  • 14.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Wed February 15, 2012 03:44 PM


  • 15.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Thu February 16, 2012 04:09 PM

    Thanks Reamon/RMG,
    Just FYI…may help other with same issue–
    We had an incident open with SAG. They said that ‘:’ is the default subfield delimiter and suggested us to use a value other than ‘:’ as a way out of this. So NO config settings/fixes to solve this :frowning:


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


  • 16.  RE: Issue with colon(:) in convertToString when used with quoted release character(")

    Posted Thu February 16, 2012 05:28 PM