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
  • 1.  Flat file convert to string

    Posted Sun January 01, 2017 11:50 AM

    Hi Team,

    I want to convert the ffValues into string.

    Attached is the screen shot for the values that I am passing in ffValues document.

    As a output of ConvertToString service I am getting below string, which is not expected. I want to extract name and age field. Can anyone please let me know what is wrong here?

    output string : EmpDetailserw


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Flat file convert to string

    Posted Mon January 02, 2017 02:19 AM

    Hi n b ,

    In the Flat file schema definition , In the bottom section there will be Record Identifier section which is by default set to Starts at position zero. Which is causing this issue.

    If you want the record identifier to appear in the result string , Put the appropriate value where the record identifier should come and accordingly update the positions of the fields in the flat file definition.

    If you donot want the record identifier to appear in the result string :

    • You can use Dictionary , create record definition in the Dictionary and set the record as the Default record in the Flatfile Schema
    • Or update the config to not add the record identifier in the result String. From Documentation it says

    The FF config file is present at the following location Integration Server_directory\instances\instance_name\packages\WmFlatFile\config\ff.cnf


    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Flat file convert to string

    Posted Mon January 02, 2017 11:42 AM

    Thanks Rakesh,

    It is working now,

    However there is one issue.

    In ConvertToValue service I am passing string EmpDetails,A,b,c,d,e,f,i,g,h,i,j,k,l,ABC,28 as input. Here EmpDetails consider at 0th index and in ffValues document I am getting recoredID as EmpDetails because record Identifier starting from 0th index.

    Now, I am using the ConvertToString service to convert this ffValues document into string and I am getting below string in output.

    EmpDetails,ABC,28 Here I am able to extract name and age both the field.

    I want to understand After ConvertToString service why I am not getting the string values which I passed as input to ConvertToValue

    Thanks in advance,


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Flat file convert to string

    Posted Tue January 03, 2017 01:28 AM

    Hi n b ,

    The record identifier , as the name says it should be present in each record.
    So, if you are using , as field delimier , CRLF as record limiter and your flatfile is Nth field based. Then select record identifier to start at nth field (where n can be any whole number ).

    In the below example , I have selected n=2nd field for record identifier , 0th for the Employee Name field and 1st for Age field.
    Rakesh,12,EmpDetails
    Kumar,15,EmpDetails
    Tiwari,27,EmpDetails
    ABC,29,EmpDetails
    XYZ,56,EmpDetails

    When I parse this data, it will parse correctly using converToValues service . And correct String is being generated using convertToString service.

    If you are not sure whether any record identifier will be present or not in the flat file. Then better go with the approach of using dictionary i.e recordWithNoID approach.


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Flat file convert to string

    Posted Wed January 04, 2017 08:02 AM

    Thanks Rakesh,

    I understood it. Now it’s working as expected,


    #webMethods
    #Integration-Server-and-ESB