# Identifying records with substrings in rec name

**URL:** <https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [October 6, 2005, 7:22pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176 "2005-10-06T19:22:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![integ](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@integ](https://techcommunity.softwareag.com/u/integ)\
**Post date:** [October 6, 2005, 7:22pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/1 "2005-10-06T19:22:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 6, 2005, 7:38pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/2 "2005-10-06T19:38:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![integ](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@integ](https://techcommunity.softwareag.com/u/integ)\
**Post date:** [October 6, 2005, 8:03pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/3 "2005-10-06T20:03:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 6, 2005, 8:39pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/4 "2005-10-06T20:39:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![integ](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@integ](https://techcommunity.softwareag.com/u/integ)\
**Post date:** [October 6, 2005, 8:53pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/5 "2005-10-06T20:53:03Z")

</div>

fields are space deliminated.

---

<div class="post-metadata">

**Author:** ![integ](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@integ](https://techcommunity.softwareag.com/u/integ)\
**Post date:** [October 6, 2005, 10:02pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/6 "2005-10-06T22:02:57Z")

</div>

Infact the problem arise in the file with the folowing pattern

COM  
COMP  
COM

The parser really gets lost and confused.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 7, 2005, 12:48am UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/7 "2005-10-07T00:48:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![integ](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@integ](https://techcommunity.softwareag.com/u/integ)\
**Post date:** [October 10, 2005, 9:31pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/8 "2005-10-10T21:31:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 10, 2005, 11:42pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/9 "2005-10-10T23:42:42Z")

</div>

OK,i will let you know if any clue…

sometimes weird tweaks can help…

Thanks for update…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:04pm UTC](https://techcommunity.softwareag.com/t/identifying-records-with-substrings-in-rec-name/107176/10 "2021-04-02T15:04:42Z")

</div>


