I need your support in creating a flatfile schema that will parse the attached input file.
Each File will contain multiple records. Each record will have header. Each header will contain multiple trailers.
While parsing the input file, input schema should validate the first character of each record, if the value is equal to 1 then it should consider that record as Header record, if the value is equal to 2 that record should be treated as a trailer record of that header.
Always the header exits then only the trailer record exits. Without trailer there will be no trailer record
Following is the structure:
Root->
|
Header1
|
Trailer1
Trailer2
Trailer3
…
|
Header2
|
Trailer1
Trailer2
Trailer3
|
Header3
|
Trailer1
Trailer2
Trailer3
|
H…
We have created a flatfile schema, it has Recordreference(Header) containing a composite reference(trailer), when we have tested with the attached input file , all the header and trailer records were going in the Recordreference (header) block only nothing was populated in trailer block…
Based on your test file here are some thoughts.create your FFSchema RecordDefinition(1) with maxRepeat=unlimited and create its FieldDefinitions accordingly.Under same hierarchy create RecordDefinition(2) with maxRepeat=unlimited and create its FieldDefinitions as per layout.
Thanks for your input… we have created fileschme similarly what you have mentioned, but all the header records and detail records are going to the fileds under header but not to the detail record fields… and we also have input match. ie, all header records starts with “1” and all the details records start with the character “2”…
so in a file you have a header record followed by some detail records and again one more header record followed by detail records…
like as follows…
it is not sending the values to header and details records… is there any way in dictionary or fileschema where we can mention the identification character…
Header(Reference to Record definition)
********field1 (should get “1” values)
********field2
********Detail Record(Composite reference)
**************field1 (Should get “2” values)
**************field2
Probably yes.
Take a sample of your flat file and test in the schema in Developer.
To do this open the schema and hit the Run button. It will ask for a file. Select the file.
If that’s the problem you will see it here.