# ACCEPT/REJECT from ADABAS point of view

**URL:** <https://techcommunity.softwareag.com/t/accept-reject-from-adabas-point-of-view/57977>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Mainframes, Adabas-Basics-on-Mainframes\
**Created:** [April 28, 2006, 2:47pm UTC](https://techcommunity.softwareag.com/t/accept-reject-from-adabas-point-of-view/57977 "2006-04-28T14:47:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_Rukmangad](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Atul\_Rukmangad](https://techcommunity.softwareag.com/u/Atul_Rukmangad)\
**Post date:** [April 28, 2006, 2:47pm UTC](https://techcommunity.softwareag.com/t/accept-reject-from-adabas-point-of-view/57977/1 "2006-04-28T14:47:50Z")

</div>

What is the difference b/w following 2 codes

READ PRODUCT WITH PRODUCT-CODE  
IF PRODUCT-CODE NE ‘1000’  
ESCAPE TOP  
END-IF  
  
END-READ

READ PRODUCT WITH PRODUCT-CODE  
ACCEPT IF PRODUCT-CODE EQ ‘1000’  
  
END-READ

---

<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 28, 2006, 3:06pm UTC](https://techcommunity.softwareag.com/t/accept-reject-from-adabas-point-of-view/57977/2 "2006-04-28T15:06:42Z")

</div>

Apart from the fact that it’s bad style anyway and you may end up reading millions of records just to filter one or some of them -

from an Adabas point of view there is no difference, because ACCEPT / REJECT are Natural statements and are handled by Natural.

---

<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:** [April 29, 2006, 3:23am UTC](https://techcommunity.softwareag.com/t/accept-reject-from-adabas-point-of-view/57977/3 "2006-04-29T03:23:11Z")

</div>

If you are really selecting by product code, then the example should read:

READ PRODUCT WITH PRODUCT-CODE = ‘1000’ THRU ‘1000’  
  
END-READ

or just:  
FIND PRODUCT WITH PRODUCT-CODE = ‘1000’  
  
END-READ

This would avoid the problem Wolfgang alludes to (reading millions of records to filter a few of them) as Adabas would only return records with the desired product code.

---

<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:38pm UTC](https://techcommunity.softwareag.com/t/accept-reject-from-adabas-point-of-view/57977/4 "2021-04-02T14:38:58Z")

</div>


