Display Running Totals

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?

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.

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

How about using *counter ?
It is incremented automatically by Natural, and can be used in Find and in Read.