none
Flat file schema for non-tagged positional data with multiple optional repeating segments

    Question

  • A client has a legacy application the produces flat files that I need to translate into an XML format for input into a new system. The flat files have CRLF delimited records similar to:

    • Payment Record 1
    • Payment Record n
    • Batch Header Record
    • Control Record

    All the records are defined as positional with no delimiters or useful tags. The payment record has several instances of segments (groups of one or more fields) which are optional/repeating and whose count are defined by prior fields in the record. So a payment record may look like this:

    aaaabbbbbbbbcccddddxxxyyyzzz

    or like this:

    aaaabbbbbbbbcccddddxxxyyyzzzeeeffggggeeeffgggghhhhhhiiiiijjjjjjjjkkkkkklllllll

    Where

    1. aaaa = field 1
    2. bbbbbbbb = field 2
    3. ccc = field 3
    4. dddd = field 4
    5. xxx = field 5 (segment a count) (0 in first example 2 in second)
    6. yyy = field 6 (segment b count) (0 in first example 1 in second)
    7. zzz = field 7 (segment c count) (0 in first example 1 in second)
    8. eee = segment a field 1
    9. ff = segment a field 2
    10. gggg = segment a field 3
    11. hhhhhh = segment b field 1
    12. iiiii = segment b field 2
    13. jjjjjjjj = segment c field 1
    14. kkkkkk = segment c field 2
    15. lllllll = segment c field 3

    Fields 5-7 provide a count which dictates how many times the corresponding segment will occur. The counts could be 0 - 999 in this example. My understanding of XSDs at this point is that they don't deal with this older style of run length encoding of data. Is this correct or is there a way to define a schema for this? Is there a way to use BizTalk to transform this flat file into the desired XML schema? Or will be just as easy to do a one-off file converter applet?

    Thanks,

    Ed

    Thursday, September 19, 2013 10:25 PM

Answers

  • Sorry, no, what you describe is not handled natively by the Flat File Disassembler.

    However, BizTalk Server can and has certainly handled such situations before by writing a custom Pipeline Component.  This would be our equivalent of a "file converter applet".

    By using this method, you can still take advantage of all other native BizTalk services.

    • Marked as answer by Ed_Hand Friday, September 20, 2013 1:13 AM
    Friday, September 20, 2013 12:37 AM

All replies

  • Sorry, no, what you describe is not handled natively by the Flat File Disassembler.

    However, BizTalk Server can and has certainly handled such situations before by writing a custom Pipeline Component.  This would be our equivalent of a "file converter applet".

    By using this method, you can still take advantage of all other native BizTalk services.

    • Marked as answer by Ed_Hand Friday, September 20, 2013 1:13 AM
    Friday, September 20, 2013 12:37 AM
  • Thanks, I figured that writing some custom component within the framework would probably be a workable answer but wasn't sure if it would be an adapter, pipeline, etc. I'm basically new to BizTalk having not really touched it since about the year 2K...

    Thanks again,

    Ed

    Friday, September 20, 2013 1:13 AM