# Display Running Totals

**URL:** <https://techcommunity.softwareag.com/t/display-running-totals/60421>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [January 11, 2006, 3:52am UTC](https://techcommunity.softwareag.com/t/display-running-totals/60421 "2006-01-11T03:52:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedBaron](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@RedBaron](https://techcommunity.softwareag.com/u/RedBaron)\
**Post date:** [January 11, 2006, 3:52am UTC](https://techcommunity.softwareag.com/t/display-running-totals/60421/1 "2006-01-11T03:52:37Z")

</div>

I want to display a running total of a count as a loop is being processed, and I’m pretty sure I’ve seen it done with the number of records being processed during a FIND.

But I can’t seem find a way to do it; what should I be using to continuously display a running total?

---

<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:** [January 11, 2006, 10:32am UTC](https://techcommunity.softwareag.com/t/display-running-totals/60421/2 "2006-01-11T10:32:39Z")

</div>

For database access loops (FIND, READ, HISTOGRAM), \*COUNTER contains the current iteration, so you can DISPLAY \*COUNTER within the loop.

For other loops (FOR, REPEAT, CALL FILE, CALL LOOP), you will need to increment your own variable for display.

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@Finn\_the\_Dane](https://techcommunity.softwareag.com/u/Finn_the_Dane)\
**Post date:** [January 11, 2006, 1:17pm UTC](https://techcommunity.softwareag.com/t/display-running-totals/60421/3 "2006-01-11T13:17:56Z")

</div>

I think what you’re looking for is the statement  
SET CONTROl ‘N’  
that wil ignore the next input, i.e. you can write to the screen, and won’t have to wait for acknowledment from the user.

Finn

---

<div class="post-metadata">

**Author:** ![Yehuda](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/yehuda/32/115_2.png) [@Yehuda](https://techcommunity.softwareag.com/u/Yehuda)\
**Post date:** [January 11, 2006, 1:29pm UTC](https://techcommunity.softwareag.com/t/display-running-totals/60421/4 "2006-01-11T13:29:41Z")

</div>

How about using \*counter ?  
It is incremented automatically by Natural, and can be used in Find and in 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 2, 2021, 2:40pm UTC](https://techcommunity.softwareag.com/t/display-running-totals/60421/5 "2021-04-02T14:40:24Z")

</div>


