Identifying records with substrings in rec name

I have a flat file with following data.


COM data data
COMPdata

so I created record definitions for COM adn COMP at same level, when i tetsed the data file against the schema in devleoper I dont get the expected result I should be getting COM and COMP records at the smae level. what i get is COMP as child of COM.

Can anyone please suggest the remedy.

PD,
what is the record delimiter you set and coming in the flatfile…see if delimiter is creating problem when parsing…Unless you keep COMP under COM record it does not show you as a child of COM.

HTHm
RMG

new line is set as record deliminator. And new line as deliinator is working fine with other records. Am i missing t oset some other record property?

Is it fixed length?and what is the field delimiter?

fields are space deliminated.

Infact the problem arise in the file with the folowing pattern

COM
COMP
COM

The parser really gets lost and confused.

If so in your flatfile schema create COM recorddefinition(set maxRepeat=Unlimited) and create COMP recorddefinition as child of COM,so that your flatfile will parse as a trick.

HTH,
RMG

No RMG it could not be soleved this way, I have to do a work around for identifying each section uniquely because the COMP section occurs anywhere in the messsage (it does not always appear below COM) so I cannot design it to be the child of COMP. But for time being the work around is working fine for me, lets see how it goes ahead. Let me know if you have some other suggestion.

OK,i will let you know if any clue…

sometimes weird tweaks can help…

Thanks for update…