locked
Positional FlatFile Multiple Repeating Records RRS feed

  • Question

  • I need convert below flat file schema to xml

    Header Record
    Tracking Record(Repeating records)
    Misc
    Pallet Header Record(Repeating Record)
    Pallet Details(Repeating Record)

    89  699333O280OM89  3591111   0699333O 000000089990098(Header Record)
    89 UPC 1234 Tracking repeating Record
    89 FedEx 5678
    89  699333O283OM89  3591111   3        0000000 89  699333O282OM89            2S11111 00(MISC)                                 
    89  699333O282OM89  3651011   2S11111 100010000001000000100 (Pallet Header Repeating Records) 
    89  699333O282OM89            2S11111 00000000000012 (Pallet line repeating records)
    89  699333O282OM89            2S22222 00000000152100  (Pallet Header Repeating Records)
    89  699333O282OM89  3591111   2S22222 100020000000012000001 (Pallet line repeating records)

    I have created records for every repeating records to break new line character but all comes into one record

    Thursday, March 16, 2017 7:07 PM

Answers

  • Ayayay!  That's a pretty unfriendly format, mostly because putting the Tag within the content make it more difficult to deal with. Still this is not a problem with you app or BizTalk, the create of this format just made more complicated than it needs to be. Anyway...

    The most direct way to address this is with a custom Pipeline Component that copies the Tag to the beginning of each line, then you can just use the a regular Flat File Schema.

    There's also a way using just Schemas and a Map.

    Thursday, March 23, 2017 7:58 PM
    Moderator

All replies

  • It looks like the problem is there is no way to differentiate between the line types.

    This is not a problem with BizTalk, you or your app.  This is pretty lousy flat file format.  Do they have any other options?


    Thursday, March 16, 2017 8:18 PM
    Moderator
  • we can identify each record by record type in the FF

    0 = header; 1 = tracking; 2 = details

    identify line header and type

    0 = header; 1 = detail

    Thursday, March 23, 2017 6:03 PM
  • Ayayay!  That's a pretty unfriendly format, mostly because putting the Tag within the content make it more difficult to deal with. Still this is not a problem with you app or BizTalk, the create of this format just made more complicated than it needs to be. Anyway...

    The most direct way to address this is with a custom Pipeline Component that copies the Tag to the beginning of each line, then you can just use the a regular Flat File Schema.

    There's also a way using just Schemas and a Map.

    Thursday, March 23, 2017 7:58 PM
    Moderator
  • I have generated schema which tracking , Pallet header and details are repeating records but when validate instances all records are going to tracking and splitting also not happened properly
    Thursday, March 23, 2017 8:42 PM
  • Yes, it's because there is no easy way to differentiate the line types.

    You have the two options I explained above.

    Thursday, March 23, 2017 8:51 PM
    Moderator
  • please describe more about second option
    Thursday, March 23, 2017 9:13 PM
  • Basically:

    1. Parse the row into ~5 fields, with the two tags in specific fields.
    2. Reorder the fields using a Map to a new Flat File Schema with the Tag fields at the beginning of the row.
    3. Assemble the new message back to a Flat File.  Now it has the Tags in front.
    4. Use another Flat File Schema with the Tag property set.  Now, the Flat File Disassembler can identify the line type using the Tag.
    Thursday, March 23, 2017 9:26 PM
    Moderator
  • I did through custom pipeline component which is worked and its looks good as I expected .

    Thank you John.

    Thursday, March 23, 2017 11:02 PM