Difference between READ LOGICAL and FIND

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

  • 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

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.

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)

READ wouldn’t either :wink:

: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 :wink:

Or a CALL ‘ADABAS’ :wink:

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 :wink:

Sorry for disturbing: What about READ BY ISN? :wink:

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 :wink:

1 Like

Thanks a lot for your valuable time.

Regards,
Deeps