Booth Martin wrote:
There is a debit field and a credit field in the record layout.
The requirement is to print a third column which is a running
total. In RPG it would be
runtotal = runtotal + debit - credit
I want to do this with query but can't figure it out.
The Query/400 feature offers only its /summary functions/
accumulators. There are no other accumulators [e.g. running totals]
supported in WRKQRY; i.e. the value of prior row(s) is not tracked,
except for effecting the summaries for the /report breaks/. The
Query/38 feature [DSNQRYAPP] however, does offer running totals;
effectively the same question & response here:
This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact