× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Took a quick look at Michael's code. Consider updating it to run as a
service program procedure.

Charles

On Tue, Sep 22, 2009 at 9:05 AM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
Interesting that Query/38 had this yet Query/400 doesn't.

However if it were me, rather than move backward, I'd move forward by
converting to a Query Manager query and make use of the UDF Michael
Sansoterra provided in the article I posted a link to earlier.

As an added benefit, a QM query can take advantage of the SQE instead
of the CQE.

Charles

On Tue, Sep 22, 2009 at 1:14 AM, Evan Harris <spanner@xxxxxxxxxx> wrote:
I remember doing this in Query on the system/38; I recall that the trick was
to created a calculated field with a formula of +1.

Query/38 also did tables and there were many occasions I cursed WRKQRY on
the 400 for not having this feature.

Regards
Evan Harris

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Tuesday, 22 September 2009 5:03 p.m.
To: midrange-l@xxxxxxxxxxxx
Subject: Re: WRKQRY running total

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.

Any suggestions?

  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:

http://groups.google.com/group/comp.sys.ibm.as400.misc/msg/adb4a604bf0e8090
http://groups.google.com/group/comp.sys.ibm.as400.misc/msg/68968581704fddf9
http://groups.google.com/group/comp.sys.ibm.as400.misc/msg/b1c58664829301ab

Regards, Chuck
--

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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 [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.