# READ database

**URL:** <https://techcommunity.softwareag.com/t/read-database/199756>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [June 20, 2018, 5:23pm UTC](https://techcommunity.softwareag.com/t/read-database/199756 "2018-06-20T17:23:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Unnikrishnan\_S](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Unnikrishnan\_S](https://techcommunity.softwareag.com/u/Unnikrishnan_S)\
**Post date:** [June 20, 2018, 5:23pm UTC](https://techcommunity.softwareag.com/t/read-database/199756/1 "2018-06-20T17:23:50Z")

</div>

Hi ,  
I am READing ADABAS database , so do we have any condition for “NO RECORDS FOUND”, like what we have in FIND statement to read / access a database.  
Thanks in advance

---

<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:** [June 20, 2018, 6:49pm UTC](https://techcommunity.softwareag.com/t/read-database/199756/2 "2018-06-20T18:49:02Z")

</div>

There is no such clause for the READ statement. You test the condition yourself, after the READ loop.

```auto
R.
READ EMP BY NAME FROM 'Ralph'
             TO 'Ralph'
  ...
END-READ
IF *COUNTER (R.) = 0
  THEN
    WRITE 'Just like IF NO RECORDS FOUND'
END-IF
```

You cannot test this condition within the loop, not even with AT END OF DATA.

---

<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:40pm UTC](https://techcommunity.softwareag.com/t/read-database/199756/3 "2021-04-02T15:40:53Z")

</div>


