# Difference between READ LOGICAL and FIND

**URL:** <https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [January 17, 2006, 4:58pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432 "2006-01-17T16:58:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deeps](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Deeps](https://techcommunity.softwareag.com/u/Deeps)\
**Post date:** [January 17, 2006, 4:58pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/1 "2006-01-17T16:58:34Z")

</div>

Hi All,  
Could you please tell me the difference between READ LOGICAL and FIND?

I have Confusion with the read of inverted list in both the stmt.

Thanks,  
Deeps

---

<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:** [January 18, 2006, 2:04am UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/2 "2006-01-18T02:04:42Z")

</div>

- READ traverses the inverted list  
  
FIND first builds a result set from the inverted list, based on your search criteria, then retrieves the next-to-get ISN from the result set

---

<div class="post-metadata">

**Author:** ![Henrik\_Hermansen1](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@Henrik\_Hermansen1](https://techcommunity.softwareag.com/u/Henrik_Hermansen1)\
**Post date:** [January 19, 2006, 5:06pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/3 "2006-01-19T17:06:11Z")

</div>

That’s also why READ returns the same record multiple times when reading by a multiple descriptor with more than one match, while FIND only returns a given record once.

---

<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:** [January 25, 2006, 7:37pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/4 "2006-01-25T19:37:50Z")

</div>

FIND over the already said doesn’t returns ISNs of Zero suppressed descriptors if you would have records with an empty descriptorvalue within your searchcriteria. (Based on ADABAS-C)

---

<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:** [January 25, 2006, 8:53pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/5 "2006-01-25T20:53:57Z")

</div>

> [@Wiegandt](#):
>
> FIND over the already said doesn’t returns ISNs of Zero suppressed descriptors

READ wouldn’t either 😉

---

<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:** [January 25, 2006, 9:19pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/6 "2006-01-25T21:19:21Z")

</div>

:oops: i didn’t know that read logical also use descriptortables

---

<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:** [January 25, 2006, 9:39pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/7 "2006-01-25T21:39:01Z")

</div>

> [@Wiegandt](#):
>
> :oops: i didn’t know that read logical also use descriptortables

If you don’t have any non-null-suppressed descriptors, a READ PHYSICAL is the only way to get ALL records 😉

---

<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:** [January 25, 2006, 9:42pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/8 "2006-01-25T21:42:26Z")

</div>

Or a CALL ‘ADABAS’ 😉

---

<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:** [January 25, 2006, 9:56pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/9 "2006-01-25T21:56:17Z")

</div>

> [@Wiegandt](#):
>
> Or a CALL ‘ADABAS’ 😉

NATURAL “internally” issues L1, L2, L3 … calls as well, so you don’t get anything different with a “direct” call, you’re just using a more “friendly name” for the command 😉

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [January 26, 2006, 1:16pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/10 "2006-01-26T13:16:50Z")

</div>

> [@Wolfgang Winter](#):
>
> a READ PHYSICAL is the only way to get ALL records

Sorry for disturbing: What about READ BY ISN? 😉

---

<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:** [January 26, 2006, 1:39pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/11 "2006-01-26T13:39:39Z")

</div>

> [@Matthias](#):
>
> Sorry for disturbing: What about READ BY ISN? 😉

This only work for files with not-null-suppressed ISNs !

Just joking, your’re right, of course that’s the second “only” method to read all records independent of descriptors 😉

---

<div class="post-metadata">

**Author:** ![Deeps](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Deeps](https://techcommunity.softwareag.com/u/Deeps)\
**Post date:** [February 3, 2006, 1:36pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/12 "2006-02-03T13:36:02Z")

</div>

Thanks a lot for your valuable time.

Regards,  
Deeps

---

<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:40pm UTC](https://techcommunity.softwareag.com/t/difference-between-read-logical-and-find/60432/13 "2021-04-02T14:40:24Z")

</div>


