# Super descriptor with more than one record

**URL:** <https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [October 1, 2009, 1:00pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426 "2009-10-01T13:00:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kugh](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@Kugh](https://techcommunity.softwareag.com/u/Kugh)\
**Post date:** [October 1, 2009, 1:00pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/1 "2009-10-01T13:00:56Z")

</div>

If my super descriptor has more than one record for a particular value, is there any logic in how ADABAS builds the inverted list? (the example below seems to suggest that it then goes in ISN sequence)

TRTR-ACNT-DATE-SEQ-S ISN

* * *

0104104992009092510 2504130  
0104104992009092510 17090726  
0104104992009092510 17090728

Regards

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [October 1, 2009, 9:31pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/2 "2009-10-01T21:31:36Z")

</div>

If multiple records have the same value for a descriptor, then a FIND or a READ LOGICAL by that descriptor, for that value, will return the records in ISN sequence.

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [October 1, 2009, 11:02pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/3 "2009-10-01T23:02:02Z")

</div>

A FIND without a SORTED BY will return all results in ISN order, regardless of the value of the descriptors (if, for example, you have used a range, not equals, OR’s that select on more than one value).

Ralph’s comment is applicable to the READ LOGICAL only.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [October 1, 2009, 11:47pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/4 "2009-10-01T23:47:53Z")

</div>

How does this not pertain to FIND? The following would generate Kugh’s report.

```auto
FIND file WITH TRTR-ACNT-DATE-SEQ-S = '0104104992009092510'
```

Even if the selection criterion was wider, additional records (ISNs) might be interleaved, but these three (with the identical value) would be returned in ISN sequence (as you say, presuming there is no SORTED BY clause).

I’m presuming that Kugh’s question had more to do with the way records are returned than the way they are stored.

---

<div class="post-metadata">

**Author:** ![Kugh](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@Kugh](https://techcommunity.softwareag.com/u/Kugh)\
**Post date:** [November 6, 2009, 3:12pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/5 "2009-11-06T15:12:14Z")

</div>

Tx for the advice, much appreciated!🙂

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [November 6, 2009, 4:42pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/6 "2009-11-06T16:42:47Z")

</div>

The reason Adabas maintains all ISN lists in ISN sequence is quite simple. Consider a simple search argument like DEPT=2 AND SCLASS=4.

If the lists were not in sequence (they are), Adabas would have to take each ISN from the smaller list, and compare it against all the ISNs from the longer list; or, do the converse. Either way, a fairly expensive process.

Since the lists are in ISN sequence, Adabas can do the equivalent of a “match-merge” operation, looking for ISNs on both lists. This is far more efficient than either of the afore mentioned procedures.

steve

---

<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, 2:57pm UTC](https://techcommunity.softwareag.com/t/super-descriptor-with-more-than-one-record/91426/7 "2021-04-02T14:57:34Z")

</div>


