Flatfile schema does not load sample file appropriately


We have created a Flat file Schema for files with the following sample data :

T 00002221

The schema has the structure of “HC” as header record, “TR” for detail records and “T” for trailer record. We cannot change the flatfile structure/content because this is being provided from a legacy system.

The problem is when loading this file in the schema, the “TR” segments get loaded as “T” segment because I guess webMethods recognizes the “T” at the beginning of the “TR” segment and choses the first match. This is obviously wrong. Is there anything that can be done to remedy this?

Thank you.

flat file schema recorgnises each record from the record identifier .From the example flat file of yours , it looks like the record identifiers are located from 0-2 characters in each record .But i had a similar issue where one of the field is space .like u had “HC” , “TR” and "T ".
May be the flat file schema is not recognising the "T " as a valid record identifier .Try to test it the way i mentioned above

If the above solution does not work

The solution would be

u need to add a char in that space( "T " add “TE”) and then run the string through the flatfile schema, it should work.


Hi HTH, Thanks for the input. I had created the reference in the schema as “T” not "T " (note the space) but reading your post gave me the idea of creating the dictionary reference with "T " and now the file parses successfully. It does not mix up “T” and “TR” records because the T in “TR” is not followed by a space character.

I tell you, sometimes it’s the simplest things!!
Have a good one!