Unable to create Flat file schema

Hi Group,

I need your support in creating a flatfile schema that will parse the attached input file.

  1. Each File will contain multiple records. Each record will have header. Each header will contain multiple trailers.
  2. 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.
  3. 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…

let me know if you need any more information.

Please help me regarding this…

Regards,
Senthil.

Besides asking us to do this for you, what specific questions do you have? What have you tried? What issues are you having?

Mark

Hi Mark,

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…

pl give us some solution.

Thanks and Regds,
Christina

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.

Record1 (unlimitd)
–>Fields…
–>Record2(unlimited)
----->FieldDefinitions

Test your schema with sample file and correct the schema if necessary.

HTH,
RMG

Hi RMG,

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…

1abcederer*******************
2hohgogfn********************
2ljmjgfgf**********************
1hghfognfognfgnfgfg*************
2ofgnfognfognfgfgfog************
2gnlgnlgfgnflgn*****************

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

Thanks and Regds,
Christina

Christina,

Identification character is nothing but RecordDefinition mentioning (1 or 2) when you create FF Schema,then Schema will recognize to parse the file.

If 1 is Header and 2 is detail…then this should work.

RecordDefinition 1 (unlimited) Header
–>Fields…
–>RecordDefinition 2(unlimited) --Details
----->FieldDefinitions

what is your trailer record identifier??

HTH,
RMG

Hi all,
I Ftp a Flatfile and its working fine, but it gives me error when i tried to use the “convert to values” service for the flatfile.

It gives the error " cannot have Null node definitions "
What does that mean? Is there any problem with the flatfile schema ?

Plz let me know
Thank u

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.

Thank you so much…