Fixed Length Flat File - Nested and repeating data structure with no record identifiers

How should the data dictionary and schema be defined to specify a nested and repeating section in a fixed length flat file without record identifiers?

For example, there is a flat file that I’m working with that has the following structure:

Court Collection Record (Single Row Containing Sub-Sections below), Fixed Length fields)
      \_ Person Identifiers
      \_ Charge Section (Repeats 6X)
            \_ Fine Section (Subsection of Charge, Repeats 2X for each Charge Section)
            \_ Fee Section (Subsection of Charge, Repeats 16X for each Charge Section)

I was able to create a data dictionary with a record for each section and then a data schema that nested the records into the structure desired. As no records have ID’s, the documentation stated that there had to be a default record type specified. Due to the default record being specified, all data was parsed into that record type only. When parsing a test record, the data for the whole row was placed into the first record type(Person Identifiers). Without a default record, a “No Valid Record” error is received.

I’ve also tried a variation using Composite sections to representing the repeating sections, but this also did not work.

The only method that has worked is to manually define each and every field, even repeating sections, as part of a single record. This does work, however, it seems like there should be a better way to deal with repeating sections. Particularly if the repeating sections can be defined and it is known where they repeat.

Actually the source file should contain the record delimiters atleast with linefeed or \r or some thing for the parsing to work correctly even for recordWithNoID

Can you please request your source file team and see if they can assist with the record terminators in this case?

HTH,
RMG

Hi RMG,

Thank you very much for replying.

 Unfortunately, the flat file is for use in a COBOL mainframe environment that has been in existence for some time and is being worked with to decommission over several years, so it is unlikely that we will be able to get the mainframe changed, but we need to support these flat file types during the transition period.  There are also several different flat files produced with similar data within data record type of structures in the files, so I am hoping to find a way to work with the files. 

Without a record identifier, is there a good way to say that Record A starts at position X and Record B starts at position Y on the same line or possibly say that Records of type C repeat every 40 characters on each line? I was able to create a schema that looked like it would work this way, but it still puts everything within the default record without record identifiers available other than the position.

Thanks,

Rex