# Multiple ACCEPT and REJECT statements in a loop

**URL:** <https://techcommunity.softwareag.com/t/multiple-accept-and-reject-statements-in-a-loop/228624>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Natural, Adabas-on-Mainframes, Natural-on-Mainframes\
**Created:** [July 3, 2020, 10:00pm UTC](https://techcommunity.softwareag.com/t/multiple-accept-and-reject-statements-in-a-loop/228624 "2020-07-03T22:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryna11229](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bryna11229](https://techcommunity.softwareag.com/u/bryna11229)\
**Post date:** [July 3, 2020, 10:00pm UTC](https://techcommunity.softwareag.com/t/multiple-accept-and-reject-statements-in-a-loop/228624/1 "2020-07-03T22:00:00Z")

</div>

What happens if multiple ACCEPT and REJECT are used in the same read loop

---

<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:** [July 3, 2020, 11:35pm UTC](https://techcommunity.softwareag.com/t/multiple-accept-and-reject-statements-in-a-loop/228624/2 "2020-07-03T23:35:59Z")

</div>

[https://techcommunity.softwareag.com/ecosystem/documentation/natural/nat911mf/sm/accept.htm#accept-multiple-statement-proc](https://techcommunity.softwareag.com/ecosystem/documentation/natural/nat911mf/sm/accept.htm#accept-multiple-statement-proc)

---

<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:** [July 9, 2020, 5:57pm UTC](https://techcommunity.softwareag.com/t/multiple-accept-and-reject-statements-in-a-loop/228624/3 "2020-07-09T17:57:25Z")

</div>

Despite the clarity of the documentation, I recommend using AND, OR, and NOT to combine all logical conditions into a single ACCEPT or REJECT. Using multiple contiguous statements has almost never given me the result I wanted.

---

<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:44pm UTC](https://techcommunity.softwareag.com/t/multiple-accept-and-reject-statements-in-a-loop/228624/4 "2021-04-02T15:44:54Z")

</div>


