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.
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:
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.
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.
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.