webMethods

webMethods

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.  Creating Flatfile scemas for repeating fileds in one record

    Posted Wed December 03, 2008 02:33 PM

    Hi All ,

    I got one requirement which is having repeating fileds in one record with tab delimeter with no record identifier.

    eg:

    field1 field2 field3 item1 item2 item3 item1 item2 item3 item1 item2 item3

    where fileld1,field2 ,field3 are header level and item1,item2,item3 are detail level items which are repeating .

    I creating a dictionary for header level fileds as record as recordWithNOID and using the same in schema .

    Here my question how to add detail level items to this schema which I am failing to do .

    Please advice me , help is realy appeacited.

    Thanks ,

    Raj


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


  • 2.  RE: Creating Flatfile scemas for repeating fileds in one record

    Posted Wed December 03, 2008 09:47 PM

    hey raj if you cna give me some more info, i think i can be of some help.
    wht are you gonna do wid the FF ie map to DB or convert it to diff format something like that n if possible can you paste some real data( couple of rows from ur original FF).

    Thanks
    Venu


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


  • 3.  RE: Creating Flatfile scemas for repeating fileds in one record

    Posted Fri October 01, 2010 08:55 AM

    Hi All,

    I am new to webMethods.Please help me in resolving this issue.

    I am also facing the same problem.(repeating fields in one record with comma as delimiter and carriage return as record delimiter)

    For Eg:

    Field1,Field2,Field3,Field4,Field5,Field4,Field5…

    Here Field4 and Field5 are repeating.

    I have created a dictionary for first 3 fileds as record as recordWithNOID.

    Now my question is how to add the remaining fields which are repeating.(whether to create a new record or I have to add the fields to the same record)

    Please advice me.

    Thanks,
    Gokila


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


  • 4.  RE: Creating Flatfile scemas for repeating fileds in one record

    Posted Tue October 05, 2010 04:38 PM

    I would say create record with recordWithNoID and add all the fields in there (even the repeating fields…You may have to use diff name for repeating field if same field names are not allowed under a record…not sure) .Because even though they are repeating they are sent as a separate fields by the source system
    So downstream if the requirement was to insert just one repeating field into DB then code such that you drop the other field

    thanks
    Anil


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


  • 5.  RE: Creating Flatfile scemas for repeating fileds in one record

    Posted Wed October 06, 2010 07:31 AM

    Hi Anil,

    Thanks for your reply.
    I agree with your point.

    If the count(number of times the fields are repeating) is same for all records,then it will work.

    But in my case ,it will differ.
    For Eg:

    Field1,Field2,Field3,Field4,Field5,Field4,Field5
    Field1,Field2,Field3,Field4,Field5,Field4,Field5,Field4,Field5,Field4,Field5
    Field1,Field2,Field3,Field4,Field5,Field4,Field5,Field4,Field5

    Now how to proceed with this?

    Thanks,
    Gokila


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


  • 6.  RE: Creating Flatfile scemas for repeating fileds in one record

    Posted Wed October 06, 2010 10:14 AM

    Hi Gokila,

    if u know the maximum number of fields coming in one row then create a flat file dictionary with that many fields (field1,field2,…,fieldn) and make those fields optional.

    Then loop over the recordWithNoID and just map to target format.
    Let me know if it works else we can find some solution …

    Regards,

    Karan…


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


  • 7.  RE: Creating Flatfile scemas for repeating fileds in one record

    Posted Wed October 06, 2010 12:29 PM

    I agree with Karan’s point .If max rows are known then define them as optional or else i don’t think this(variable file format) can be done using flatfile schemas
    Instead you may have to read each record and tokenize based on the delimiter(comma in your case) and Loop over the string list(tokenize output ) and map each field accordingly

    Lets us know if u find anyother better solution

    thanks
    Anil


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