FlatFile Schema for a file that contains many files

Hi,
I’m having trouble defining a FF Schema for a file that has the following structure:

Multiple occurences of the following in the same one file:
Header - [Identifier: 0, Max Occurs: 1]
Detail - [Identifier: 2, Max Occurs: Unlimited]
Trailer - [Identifier: 7, Max Occurs: 1]

So, in other words, the file contains a DocumentList of:

Beginning of File
1 Header/Multiple Details/1 Trailer;
Another Header/Multiple Details/Another Trailer;
Another Header/Multiple Details/Another Trailer;
Another Header/Multiple Details/Another Trailer;
Another Header/Multiple Details/Another Trailer;
End of File

Does anyone know how to define the schema to reflect this ?? I’ve been trying for a couple of days now with no luck.

Any help is appreciated.
Cheers,
David

When you are creating record definitions in flatfile schema/Dictonary set property maximum reapeat to unlimited for detail record

Hi Sai,
That’s the easy part. I don’t think you read my original post correctly… Please take note of the "Beginning of File" and "End of File" positions in the example below…

Beginning of File ← This indicates the top of the flat file
[1 Header record/Multiple Detail records/1 Trailer record]
[1 Header record/Multiple Detail records/1 Trailer record]
[1 Header record/Multiple Detail records/1 Trailer record]
[1 Header record/Multiple Detail records/1 Trailer record]
[1 Header record/Multiple Detail records/1 Trailer record]
End of File ← This indicates that there are no more records in the file…

David

Hi,
I think there might be some confusion about the structure of the files that I am working with. There are three different record types in the file (0 - Header RecType, 2 - Detail RecType & 7- Trailer RecType)

The following is an actual file with pertinent data replaced

0 01XXX xxxxxxxxxxxxxxxxxxxxxx 072907 123456999-999999999 2999-999999999 6130000082063DataName Xxx Xxx Ssss XXX 111-222333444555More Data 7999-999 000008206300000000000000082063 000001 0 01XXX xxxxxxxxxxxxxxxxxxxxxx 180342 123456999-999999999 2999-999999999 6130000258258DataName Xxx Xxx Ccc XXX 111-222333444555More Data 2999-999999999 6130002407620DataName Xxx Xxx Ccc XXX 111-222333444555More Data 7999-999 000266587800000000000002665878 000002 0 01XXX xxxxxxxxxxxxxxxxxxxxxx 180343 123456999-999999999 2999-999999999 6130000301148DataName Xxx Xxx SAaa XXX 111-222333444555More Data 2999-999999999 5130000117711DataName Xxx Xxx SAaa XXX 111-222333444555More Data 2999-999999999 6130000236489DataName Xxx Xxx SAaa XXX 111-222333444555More Data 7999-999 000065534800000000000000655348 000003 0 01XXX xxxxxxxxxxxxxxxxxxxxxx 180344 123456999-999999999 2999-999999999 6130000273069DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 6130000358317DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 6130000304706DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 6130000295708DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 3130000641029DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 6130001272117DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 6130000264446DataName Xxx Xxx TNzz XXX 111-222333444555More Data 2999-999999999 6130001035613DataName Xxx Xxx TNzz XXX 111-222333444555More Data 7999-999 000444500500000000000004445005 000008 0 01XXX xxxxxxxxxxxxxxxxxxxxxx 180345 123456999-999999999 7999-999 000000000000000000000000000000 000000 0 01XXX xxxxxxxxxxxxxxxxxxxxxx 379798 123456999-999999999 7999-999 000000000000000000000000000000 000000 0 01XXX xxxxxxxxxxxxxxxxxxxxxx 379847 123456999-999999999 7999-999 000000000000000000000000000000 000000

So what is the issue here are you unable to create a FFSchema or parsing for this format?

What you have given is the record structure in the same hierarchy?

0 (max repeat unlimited for the header)
–>2 (max repeat unlimited)
–>7 (Trailer max repeat is RM

HTH,
RMG

David,

Yes what RMG has given correct parse. even if you find difficult with parsing data.check schema definition Ordered property shold set to true

Tricky data structure for a flatfile…
As Sai suggested, set the Ordered property to ‘true’. Let us know your findings.

-Senthil

Hi,
I’m confused. I know I tried that previously and it didn’t work properly. I’ve tried it again and it now works… I must of have not had one of the flags set correctly before…

 Thanks guys.  

Cheers,
David

Step by step flat file parsing, creating a Dictionary, Schema…

http://idnxchange.com/webmethods-blogs/step-by-step-flat-file-parsing-in-webmethods-82.html