Flatfile with multiple record types

I create a FF dictionary and schema to read a flatfile with multiple record types in fixed format (255 characters). My test flatfile has only 2 records and 2 record types for now (Initial and Trailer type). When I run the FF schema, it returns [FFP.0011.0016] - Element has nested errors, and child errors [FFP.0011.0001] Missing mandatory elements. Any suggestions or advice are very much appreciated.

Thanks, vldoran

How many different record types do you have defined in your schema? There is a field called “Mandatory” if set to true requires that the record type is found in the file. Could that be your problem?


I defined 2 record types in my schema ‘Initial’ and ‘Trailer’. Input file has 2 fixed-length 255-bytes records, 1 for ‘Initial’ and 9 for ‘Trailer’. WM read the 2 records as ‘Initial’. I expect it read the first one for Initial and the second one as ‘Trailer’. It does not matter if mandatory is set to True or False. My input file looks like this:

1ADPE 200605181402

Regards, Van-Loc

Have you tried selecting the “Delimiter” as your Record Parser and “newline” as your Record separator?

I have done this is in the past and still able to pick up multiple header/trailer records in a fixed length ff.


Yes, I did. Currently, my FF schema reads both input records using only the ‘Initial’ identifier. I don’t know it does not read it does not parse the second record using the ‘Trailer’ identifier.

Thanks, vldoran.

How do you define your FF dictionary for multiple record types? Under Record Definition, I created 2 record definitions, 1 for Initial and 1 for Trailer, then the fields are created under Initial and Trailer. I’m not sure if this is correct.

Thanks, vldoran.

That is how I have successfully done it before.

How about your schema, did you reference those record definitions from the dictionary and change the name to the record types “1” , “9” ?

Yes. I just got it! Thanks for your help.

No problem. Do you mind sharing the solution?

The same way you had suggested. When I re-created the record definition in my FF schema, I noticed the lengthy explanation about naming the record definition. I should have read it more carefully (duh!). It’s very nice to get many responses through this forum. Thank you and have a good holiday weekend.