Header Footer Flat File Schema

Hi all,

I am having a problem trying to create a schema that does the following:

There are two record types. The header record that is 47 characters long with the first 6 characters identifying the header record and the there is a series of body records with no identifier which is 143 characters long. Both record must be defined as fixed width and each record separated by a semi-colon.

I’ve tried defining each record in a dictionary with fixed width fields. In the Flat File schema I have defined the records to be record delimited by a ‘;’ under the assumption that the field will be broken up by their dictionary definition. In the schema In the flat file structure section I set the default record as the body record and the header set as a record reference with the name being the first 6 characters to define the record.

When I test the schema, the schema doesn’t recognise the first 6 characters and so it goes directly into the default record definition for each record.


I believe your Schema RecordDefition (RecordReference from Dictionary)first 6chars should match exactly,so make sure RecordDefinition is according to the flatfile.

Just upload a screen shot if it is ok.


The record structure looks like the following:


Highlighted is the identifier. If the Flat File schema I have set the record to be Delimiter and the record delimiter is set to ‘;’ All of the fields in the records defined in the dictionary are fixed width. Since the two records (i.e. header and body) are of different widths I could not set the schema to fixed width.

I hope this helps. Thanks for looking at this problem for me.\popgif

Then you have to choose Fixedlength and RecordDefinition is 49788 and set the fieldDefinitions to Fixedlength and specify start/end index and same for detail records too in the same.

Highlighted is the field sourceSystem. It is the identifier of the header record. It is set to fixed width 0…7 in the field definition. In the schema, the file file definition is set to delimiter with record delimiter being ; The size of the header record is 46 and the size of the body record is 140. There is no record identifier for the body record, so it was set to default in the file file schema. The header record is referenced in the file file schema with the name ABCDEF. The problem is that the first 6 characters, say ABCDEF, in the file is not being acknowledged as the identifier of the header record.


I am lit bit confused with your FFShema created and narrated.

If you set the RecordDefinition as ABCDEF and your flatfile starts with these exact chars then i am sure the Schema should recognize and parse as expected the corresponding fixed length ff.Also make sure the start/end indexes match accordingly with the flatfile,for this use the ultraedit tool or similar tool to get accurate lengths.

So what error are you getting or it is not parsing at all?


The schema now works … the solution was exactly what you said. The file contains special characters and the beginning of the text file. This was fixed using the tool you suggested (i.e. UltraEdit). The problem therefore lied with the file and not the schema logic. Thank you RMG for your help in the matter.

Good to know…Great.