Re: [U2] Running total
On 04/07/13 10:00, Martin Phillips wrote: >> From Martin's response, I'm guessing not for QM, either. > > In QM, the @1, @2, etc variables are simply local variables within the I-type > expression. This gives us the useful advantage of > being able to nest compound I-type but does, as you suggest, prevent their > use to retain values across uses of the I-type. > This is, iirc, what the documentation for UV also *claims*. It is a "feature" that it can be used to retrieve the result from the previous evaluation. Another difference between variants of the @ function ... which bit me when we switched from PI-Open to UV ... On PI, when one i-descriptor referenced another, it pulled in the compiled code as a "subroutine" or something like that. So you could combine i-descriptors that used this technique. On UV, it pulls in the source. So if an i-descriptor calls another i-descriptor using this technique you get nasty, subtle or not so subtle, breakage. Cheers, Wol ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
> From Martin's response, I'm guessing not for QM, either. In QM, the @1, @2, etc variables are simply local variables within the I-type expression. This gives us the useful advantage of being able to nest compound I-type but does, as you suggest, prevent their use to retain values across uses of the I-type. Martin Phillips Ladybridge Systems Ltd 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England +44 (0)1604-709200 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
The important general idea is this: Use the @-buffer to get the result of the i-desc calculation from the *previous* record to apply it to the calculation for the *current* record. (RetrieVe inits @-buffers to null (which goes to 0) when the sentence executes.) I don't think this works for UD's uniQuery. From Martin's response, I'm guessing not for QM, either. Kate's non-compound solution, "@1+F1", is superior to my own, "@2+F1; @1", because it allows nesting this I-descriptor inside a 2nd. For example, if you want to use this as part of running-weighted-averages. Better still, "ADDS(@,F1)" or "@ + SUMMATION( @ )" because they handle multivalues. I knew you all could come up with the details to suit your purposes. The important piece of the puzzle is extracting the previous record's calculation for use in the next record's calculation. Another example of the same idea is to see if a value has changed & process accordingly, effectively a breakpoint control inside an i-descriptor: <2> : @2; CUST.ID; IF @1 = @2 THEN [logic for same customer as last time] ELSE [logic for next customer] (The above would only be useful on a presorted list.) cds On 7/4/2013 5:04 AM, Kate Stanton wrote: I could only find doc for this in the System Description manual, where it talks about using @ in I-type expressions, where @ is the previous one (just resolved), @1 is result of first "sentence" (separated by ;), @2 is result of 2nd sentence, etc. I could not see an example of using the result from the previous record, but it works. BTW, with multi-values, ADDS(@1,F26) works. V1 of first record adds to V1 of 2nd, etc. I can't think of where we could use it, but it depends on your file structure. On 4 July 2013 11:47, Peter Cheney wrote: I believe the expression in the second example is referred to as a compound expression? Can't put my finger on the exact documentation but I seem to recall that compound expressions are broken up into "parts" (for want of a better term) delimited by a ';' and each "part" can be referenced throughout the entire expression by an @ number e..g. @1 refers to the first part and the nth part is @n etc. So for: LIST VOC SIZE EVAL "SIZE + @2;@" My take on how this works is the the first part of the expression (SIZE + @2) can be referenced later on as @1, The second part is referenced as @ (instead of @2) and I believe is used to refer to the result of the entire expression (sum of all the parts). Can @ in this case also be referenced as @2? It probably could but would break the expression. Therefore the reference to @2 is causing the expression to grab the entire result using contents of @ (via @2 thus keeping it separate to @) and add it to SIZE which then becomes the new result (@) of the expressions and the whole thing is repeated. Does that sound about tight? Or have I got it way wrong? Cheers Peter Peter Cheney Universe Engineer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au | w www.firstmac.com.au From: u2-users-boun...@listserver.u2ug.org [ u2-users-boun...@listserver.u2ug.org] on behalf of Wjhonson [ wjhon...@aol.com] Sent: Thursday, 4 July 2013 7:31 AM To: u2-users@listserver.u2ug.org; donr_w...@yahoo.com Subject: Re: [U2] Running total Can anyone explain this situation better. I've only ever used the @ to simplify a few I-descriptors. I have a dict item SIZE that is just the LEN(@RECORD) So in this thread we've seen two EVAL solutions to a running total LIST VOC SIZE EVAL "@1+SIZE" LIST VOC SIZE EVAL "SIZE + @2;@" In the first example is the @1 just saving the "previous result of THIS eval ?" And then in the second example does the fact that SIZE is first in the Eval, effectively *push* the accumulator into position two or something? So that's why you need @2 ? And then what would be the meaning of ";@" at the end of that? Pretty confusing stuff! ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
You can also see what the I-type does by DLIST yourfile yourdictitem It's the equivalent of VLIST for I-Types... -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Peter Cheney Sent: Thursday, 4 July 2013 9:48 AM To: U2 Users List Subject: Re: [U2] Running total I believe the expression in the second example is referred to as a compound expression? Can't put my finger on the exact documentation but I seem to recall that compound expressions are broken up into "parts" (for want of a better term) delimited by a ';' and each "part" can be referenced throughout the entire expression by an @ number e..g. @1 refers to the first part and the nth part is @n etc. So for: LIST VOC SIZE EVAL "SIZE + @2;@" My take on how this works is the the first part of the expression (SIZE + @2) can be referenced later on as @1, The second part is referenced as @ (instead of @2) and I believe is used to refer to the result of the entire expression (sum of all the parts). Can @ in this case also be referenced as @2? It probably could but would break the expression. Therefore the reference to @2 is causing the expression to grab the entire result using contents of @ (via @2 thus keeping it separate to @) and add it to SIZE which then becomes the new result (@) of the expressions and the whole thing is repeated. Does that sound about tight? Or have I got it way wrong? Cheers Peter Peter Cheney Universe Engineer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au | w www.firstmac.com.au From: u2-users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] on behalf of Wjhonson [wjhon...@aol.com] Sent: Thursday, 4 July 2013 7:31 AM To: u2-users@listserver.u2ug.org; donr_w...@yahoo.com Subject: Re: [U2] Running total Can anyone explain this situation better. I've only ever used the @ to simplify a few I-descriptors. I have a dict item SIZE that is just the LEN(@RECORD) So in this thread we've seen two EVAL solutions to a running total LIST VOC SIZE EVAL "@1+SIZE" LIST VOC SIZE EVAL "SIZE + @2;@" In the first example is the @1 just saving the "previous result of THIS eval ?" And then in the second example does the fact that SIZE is first in the Eval, effectively *push* the accumulator into position two or something? So that's why you need @2 ? And then what would be the meaning of ";@" at the end of that? Pretty confusing stuff! ** IMPORTANT MESSAGE * This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ** ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
I could only find doc for this in the System Description manual, where it talks about using @ in I-type expressions, where @ is the previous one (just resolved), @1 is result of first "sentence" (separated by ;), @2 is result of 2nd sentence, etc. I could not see an example of using the result from the previous record, but it works. BTW, with multi-values, ADDS(@1,F26) works. V1 of first record adds to V1 of 2nd, etc. I can't think of where we could use it, but it depends on your file structure. On 4 July 2013 11:47, Peter Cheney wrote: > I believe the expression in the second example is referred to as a > compound expression? > > Can't put my finger on the exact documentation but I seem to recall that > compound expressions are broken up into "parts" (for want of a better term) > delimited by a ';' and each "part" can be referenced throughout the entire > expression by an @ number e..g. @1 refers to the first part and the nth > part is @n etc. > > So for: > LIST VOC SIZE EVAL "SIZE + @2;@" > > My take on how this works is the the first part of the expression (SIZE + > @2) can be referenced later on as @1, The second part is referenced as @ > (instead of @2) and I believe is used to refer to the result of the entire > expression (sum of all the parts). > > Can @ in this case also be referenced as @2? It probably could but would > break the expression. > > Therefore the reference to @2 is causing the expression to grab the entire > result using contents of @ (via @2 thus keeping it separate to @) and add > it to SIZE which then becomes the new result (@) of the expressions and the > whole thing is repeated. > > Does that sound about tight? Or have I got it way wrong? > > Cheers > Peter > > > > > Peter Cheney > > Universe Engineer > > t 07 3017 8837 | f 07 3002 8400 > > e peter.che...@firstmac.com.au | w www.firstmac.com.au > > > > > From: u2-users-boun...@listserver.u2ug.org [ > u2-users-boun...@listserver.u2ug.org] on behalf of Wjhonson [ > wjhon...@aol.com] > Sent: Thursday, 4 July 2013 7:31 AM > To: u2-users@listserver.u2ug.org; donr_w...@yahoo.com > Subject: Re: [U2] Running total > > Can anyone explain this situation better. I've only ever used the @ to > simplify a few I-descriptors. > > I have a dict item SIZE that is just the LEN(@RECORD) > > So in this thread we've seen two EVAL solutions to a running total > > LIST VOC SIZE EVAL "@1+SIZE" > LIST VOC SIZE EVAL "SIZE + @2;@" > > In the first example is the @1 just saving the "previous result of THIS > eval ?" > > And then in the second example does the fact that SIZE is first in the > Eval, effectively *push* the accumulator into position two or something? > So that's why you need @2 ? > > And then what would be the meaning of ";@" at the end of that? > > Pretty confusing stuff! > > > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > > --- > Note: > This email (inc all attachments) is for the use of the intended > recipient(s) only. > Privileged or confidential information may be contained in this > communication. If you have received this email in error, please notify the > sender immediately and then delete all copies of this message from your > computer network. If you are not the intended recipient, you must not keep, > use, disclose, copy or distribute this email without the author's prior > permission. If you are the intended recipient and you do not wish to > receive similar electronic messages from us in future, then please respond > to the sender to this effect. > We have taken precautions to minimise the risk of transmitting software > viruses, but advise you to carry out your own virus checks on this email > and its attachments. We do not accept liability for any loss or damage > caused by software viruses and do not represent that this transmission is > free from viruses or other defects. > Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) > > > --- > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > -- Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Phone: + 64 9 360 5310 Mobile: + 64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
I believe the expression in the second example is referred to as a compound expression? Can't put my finger on the exact documentation but I seem to recall that compound expressions are broken up into "parts" (for want of a better term) delimited by a ';' and each "part" can be referenced throughout the entire expression by an @ number e..g. @1 refers to the first part and the nth part is @n etc. So for: LIST VOC SIZE EVAL "SIZE + @2;@" My take on how this works is the the first part of the expression (SIZE + @2) can be referenced later on as @1, The second part is referenced as @ (instead of @2) and I believe is used to refer to the result of the entire expression (sum of all the parts). Can @ in this case also be referenced as @2? It probably could but would break the expression. Therefore the reference to @2 is causing the expression to grab the entire result using contents of @ (via @2 thus keeping it separate to @) and add it to SIZE which then becomes the new result (@) of the expressions and the whole thing is repeated. Does that sound about tight? Or have I got it way wrong? Cheers Peter Peter Cheney Universe Engineer t 07 3017 8837 | f 07 3002 8400 e peter.che...@firstmac.com.au | w www.firstmac.com.au From: u2-users-boun...@listserver.u2ug.org [u2-users-boun...@listserver.u2ug.org] on behalf of Wjhonson [wjhon...@aol.com] Sent: Thursday, 4 July 2013 7:31 AM To: u2-users@listserver.u2ug.org; donr_w...@yahoo.com Subject: Re: [U2] Running total Can anyone explain this situation better. I've only ever used the @ to simplify a few I-descriptors. I have a dict item SIZE that is just the LEN(@RECORD) So in this thread we've seen two EVAL solutions to a running total LIST VOC SIZE EVAL "@1+SIZE" LIST VOC SIZE EVAL "SIZE + @2;@" In the first example is the @1 just saving the "previous result of THIS eval ?" And then in the second example does the fact that SIZE is first in the Eval, effectively *push* the accumulator into position two or something? So that's why you need @2 ? And then what would be the meaning of ";@" at the end of that? Pretty confusing stuff! ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users --- Note: This email (inc all attachments) is for the use of the intended recipient(s) only. Privileged or confidential information may be contained in this communication. If you have received this email in error, please notify the sender immediately and then delete all copies of this message from your computer network. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email without the author's prior permission. If you are the intended recipient and you do not wish to receive similar electronic messages from us in future, then please respond to the sender to this effect. We have taken precautions to minimise the risk of transmitting software viruses, but advise you to carry out your own virus checks on this email and its attachments. We do not accept liability for any loss or damage caused by software viruses and do not represent that this transmission is free from viruses or other defects. Firstmac Limited (ABN 59 094 145 963) (AFSL 290600) --- ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Can anyone explain this situation better. I've only ever used the @ to simplify a few I-descriptors. I have a dict item SIZE that is just the LEN(@RECORD) So in this thread we've seen two EVAL solutions to a running total LIST VOC SIZE EVAL "@1+SIZE" LIST VOC SIZE EVAL "SIZE + @2;@" In the first example is the @1 just saving the "previous result of THIS eval ?" And then in the second example does the fact that SIZE is first in the Eval, effectively *push* the accumulator into position two or something? So that's why you need @2 ? And then what would be the meaning of ";@" at the end of that? Pretty confusing stuff! ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Thanks, Don. I had not tried to use it with multi-values. Cheers, Kate On 4 July 2013 01:54, Don Robinson wrote: > Kate, > > This gives strange results if F1 is multi-valued so attribute 2 > of the dict item needs to be: @1+SUM(F1) > > Thanks, > Don Robinson > > > > From: Kate Stanton > To: U2 Users List > Sent: Tuesday, July 2, 2013 6:32 PM > Subject: Re: [U2] Running total > > > Are you looking for @1? This gives a column containing running total (I > learned it from this list) > > DICT AP F1invoice value (A type or I type) > T1running total I type: F2: @1 + F1 > > So, listing 3 items gives: > > LIST AP TOTAL F1 KATE 10:26:30am 03 Jul 2013 PAGE1 > APID. INV. T1. > AMT. > > 101*850563 52,578.2452,578.24 > 101*850568 -86.2452,492.00 > 101*850569 86.2452,578.24 > > *** 52,578.24 > > 3 records listed. > > > > On 2 July 2013 20:29, Martin Phillips > wrote: > > > Hi, > > > > > > > > As far as I know, the only way to do this in U2 is to use either a common > > variable or one of the @USERn variables in a subroutine to > > accumulate the result. Handling multi-values is not hard (as below). > > Getting this to work for breakpoint lines is a bit more > > awkward. > > > > > > > > For example, using UniVerse's demonstration sales database > > (INITIALIZE.DEMO), I can create an I-type named ACCUM that reads > > > >I > > > >subr('ACCUMULATE', ITEM.TOTAL) > > > >MD2 > > > >Cumulative > > > > 8R > > > >M > > > >BOUGHT > > > > > > > > and a program catalogued as ACCUMULATE > > > > > > > > function accumulate(item) > > > >common /total/tot > > > > > > > >if @ni = 1 then tot = 0 > > > > > > > >x = '' > > > >n = dcount(item, @vm) > > > >for i = 1 to n > > > > tot += item<1,i> > > > > x<1,i> = tot > > > >next i > > > > > > > >return (x) > > > > end > > > > > > > > I can then do > > > >LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM > > > > > > > > @ID.. Product No Sell. Qty. Item Total Cumulative > > > > > > > > 10002605$40.001 $40.00 40.00 > > > > 501 $5.001 $5.00 45.00 > > > > 502 $5.001 $5.00 50.00 > > > > 504 $5.001 $5.00 55.00 > > > > 10006112 $6.003 $18.00 73.00 > > > > 10004704$115.001$115.00 188.00 > > > > 301$10.009 $90.00 278.00 > > > > 10005502 $5.009 $45.00 323.00 > > > > 10003202 $5.0010 $50.00 373.00 > > > > 204 $5.0010 $50.00 423.00 > > > > 10001112 $6.007 $42.00 465.00 > > > > 418 $27.004$108.00 573.00 > > > > 704$115.001$115.00 688.00 > > > > 10007301$10.003 $30.00 718.00 > > > > > > > > > > > > Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier > > keyword that we have in QM to make this trivial > > > > > > > > > > > > Martin Phillips > > > > Ladybridge Systems Ltd > > > > 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England > > > > +44 (0)1604-709200 > > > > > > > > > > > > > > > > -Original Message- > > From: u2-users-boun...@listserver.u2ug.org [mailto: > > u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson > > Sent: 02 July 2013 01:36 > > To: u2-users@listserver.u2ug.org > > Subject: [U2] Running total > > > > > > > > Teach me again how to do a running total in a Access/Recall/English > report. > > > > I haven't done one in years, but I seem to recall that it's possible. > > > > > > > > > > > > ___ > > > > U
Re: [U2] Running total
But correct me if I'm mistaking this, but doesn't this mean you need a special extra dict entry for any column for which you want a running total? So if I have a file with ten different fields that hold raw dollar amounts and I may want a running total on any particular one of them, I would need ten more dict items, one for each ? Or am I reading this solution wrong? -Original Message- From: Don Robinson To: U2 Users List Sent: Wed, Jul 3, 2013 6:54 am Subject: Re: [U2] Running total Kate, This gives strange results if F1 is multi-valued so attribute 2 of the dict item needs to be: @1+SUM(F1) Thanks, Don Robinson From: Kate Stanton To: U2 Users List Sent: Tuesday, July 2, 2013 6:32 PM Subject: Re: [U2] Running total Are you looking for @1? This gives a column containing running total (I learned it from this list) DICT AP F1invoice value (A type or I type) T1running total I type: F2: @1 + F1 So, listing 3 items gives: LIST AP TOTAL F1 KATE 10:26:30am 03 Jul 2013 PAGE1 APID. INV. T1. AMT. 101*850563 52,578.2452,578.24 101*850568 -86.2452,492.00 101*850569 86.2452,578.24 *** 52,578.24 3 records listed. On 2 July 2013 20:29, Martin Phillips wrote: > Hi, > > > > As far as I know, the only way to do this in U2 is to use either a common > variable or one of the @USERn variables in a subroutine to > accumulate the result. Handling multi-values is not hard (as below). > Getting this to work for breakpoint lines is a bit more > awkward. > > > > For example, using UniVerse's demonstration sales database > (INITIALIZE.DEMO), I can create an I-type named ACCUM that reads > >I > >subr('ACCUMULATE', ITEM.TOTAL) > >MD2 > >Cumulative > > 8R > >M > >BOUGHT > > > > and a program catalogued as ACCUMULATE > > > > function accumulate(item) > >common /total/tot > > > >if @ni = 1 then tot = 0 > > > >x = '' > >n = dcount(item, @vm) > >for i = 1 to n > > tot += item<1,i> > > x<1,i> = tot > >next i > > > >return (x) > > end > > > > I can then do > >LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM > > > > @ID.. Product No Sell. Qty. Item Total Cumulative > > > > 10002605$40.001 $40.00 40.00 > > 501 $5.001 $5.00 45.00 > > 502 $5.001 $5.00 50.00 > > 504 $5.001 $5.00 55.00 > > 10006112 $6.003 $18.00 73.00 > > 10004704$115.001$115.00 188.00 > > 301$10.009 $90.00 278.00 > > 10005502 $5.009 $45.00 323.00 > > 10003202 $5.0010 $50.00 373.00 > > 204 $5.0010 $50.00 423.00 > > 10001112 $6.007 $42.00 465.00 > > 418$27.004$108.00 573.00 > > 704$115.001$115.00 688.00 > > 10007301$10.003 $30.00 718.00 > > > > > > Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier > keyword that we have in QM to make this trivial > > > > > > Martin Phillips > > Ladybridge Systems Ltd > > 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England > > +44 (0)1604-709200 > > > > > > > > -Original Message- > From: u2-users-boun...@listserver.u2ug.org [mailto: > u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson > Sent: 02 July 2013 01:36 > To: u2-users@listserver.u2ug.org > Subject: [U2] Running total > > > > Teach me again how to do a running total in a Access/Recall/English report. > > I haven't done one in years, but I seem to recall that it's possible. > > > > > > ___ > > U2-Users mailing list > > <mailto:U2-Users@listserver.u2ug.org> U2-Users@listserver.u2ug.org > > <http://listserver.u2ug.org/mailman/listinfo/u2-users> > http://listserver.u2ug.org/mailman/listinfo/u2-users > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > -- Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Phone: + 64 9 360 5310 Mobile: + 64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Kate, This gives strange results if F1 is multi-valued so attribute 2 of the dict item needs to be: @1+SUM(F1) Thanks, Don Robinson From: Kate Stanton To: U2 Users List Sent: Tuesday, July 2, 2013 6:32 PM Subject: Re: [U2] Running total Are you looking for @1? This gives a column containing running total (I learned it from this list) DICT AP F1 invoice value (A type or I type) T1 running total I type: F2: @1 + F1 So, listing 3 items gives: LIST AP TOTAL F1 KATE 10:26:30am 03 Jul 2013 PAGE 1 APID. INV. T1. AMT. 101*850563 52,578.24 52,578.24 101*850568 -86.24 52,492.00 101*850569 86.24 52,578.24 *** 52,578.24 3 records listed. On 2 July 2013 20:29, Martin Phillips wrote: > Hi, > > > > As far as I know, the only way to do this in U2 is to use either a common > variable or one of the @USERn variables in a subroutine to > accumulate the result. Handling multi-values is not hard (as below). > Getting this to work for breakpoint lines is a bit more > awkward. > > > > For example, using UniVerse's demonstration sales database > (INITIALIZE.DEMO), I can create an I-type named ACCUM that reads > > I > > subr('ACCUMULATE', ITEM.TOTAL) > > MD2 > > Cumulative > > 8R > > M > > BOUGHT > > > > and a program catalogued as ACCUMULATE > > > > function accumulate(item) > > common /total/tot > > > > if @ni = 1 then tot = 0 > > > > x = '' > > n = dcount(item, @vm) > > for i = 1 to n > > tot += item<1,i> > > x<1,i> = tot > > next i > > > > return (x) > > end > > > > I can then do > > LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM > > > > @ID.. Product No Sell. Qty. Item Total Cumulative > > > > 10002 605 $40.00 1 $40.00 40.00 > > 501 $5.00 1 $5.00 45.00 > > 502 $5.00 1 $5.00 50.00 > > 504 $5.00 1 $5.00 55.00 > > 10006 112 $6.00 3 $18.00 73.00 > > 10004 704 $115.00 1 $115.00 188.00 > > 301 $10.00 9 $90.00 278.00 > > 10005 502 $5.00 9 $45.00 323.00 > > 10003 202 $5.00 10 $50.00 373.00 > > 204 $5.00 10 $50.00 423.00 > > 10001 112 $6.00 7 $42.00 465.00 > > 418 $27.00 4 $108.00 573.00 > > 704 $115.00 1 $115.00 688.00 > > 10007 301 $10.00 3 $30.00 718.00 > > > > > > Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier > keyword that we have in QM to make this trivial > > > > > > Martin Phillips > > Ladybridge Systems Ltd > > 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England > > +44 (0)1604-709200 > > > > > > > > -Original Message- > From: u2-users-boun...@listserver.u2ug.org [mailto: > u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson > Sent: 02 July 2013 01:36 > To: u2-users@listserver.u2ug.org > Subject: [U2] Running total > > > > Teach me again how to do a running total in a Access/Recall/English report. > > I haven't done one in years, but I seem to recall that it's possible. > > > > > > ___ > > U2-Users mailing list > > <mailto:U2-Users@listserver.u2ug.org> U2-Users@listserver.u2ug.org > > <http://listserver.u2ug.org/mailman/listinfo/u2-users> > http://listserver.u2ug.org/mailman/listinfo/u2-users > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > -- Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Phone: + 64 9 360 5310 Mobile: + 64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Are you looking for @1? This gives a column containing running total (I learned it from this list) DICT AP F1invoice value (A type or I type) T1 running total I type: F2: @1 + F1 So, listing 3 items gives: LIST AP TOTAL F1 KATE 10:26:30am 03 Jul 2013 PAGE1 APID. INV. T1. AMT. 101*850563 52,578.24 52,578.24 101*850568 -86.24 52,492.00 101*850569 86.24 52,578.24 *** 52,578.24 3 records listed. On 2 July 2013 20:29, Martin Phillips wrote: > Hi, > > > > As far as I know, the only way to do this in U2 is to use either a common > variable or one of the @USERn variables in a subroutine to > accumulate the result. Handling multi-values is not hard (as below). > Getting this to work for breakpoint lines is a bit more > awkward. > > > > For example, using UniVerse's demonstration sales database > (INITIALIZE.DEMO), I can create an I-type named ACCUM that reads > >I > >subr('ACCUMULATE', ITEM.TOTAL) > >MD2 > >Cumulative > > 8R > >M > >BOUGHT > > > > and a program catalogued as ACCUMULATE > > > > function accumulate(item) > >common /total/tot > > > >if @ni = 1 then tot = 0 > > > >x = '' > >n = dcount(item, @vm) > >for i = 1 to n > > tot += item<1,i> > > x<1,i> = tot > >next i > > > >return (x) > > end > > > > I can then do > >LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM > > > > @ID.. Product No Sell. Qty. Item Total Cumulative > > > > 10002 605 $40.00 1 $40.00 40.00 > > 501 $5.00 1 $5.00 45.00 > > 502 $5.00 1 $5.00 50.00 > > 504 $5.00 1 $5.00 55.00 > > 10006 112 $6.00 3 $18.00 73.00 > > 10004 704$115.00 1 $115.00 188.00 > > 301 $10.00 9 $90.00 278.00 > > 10005 502 $5.00 9 $45.00 323.00 > > 10003 202 $5.0010 $50.00 373.00 > > 204 $5.0010 $50.00 423.00 > > 10001 112 $6.00 7 $42.00 465.00 > > 418 $27.00 4 $108.00 573.00 > > 704$115.00 1 $115.00 688.00 > > 10007 301 $10.00 3 $30.00 718.00 > > > > > > Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier > keyword that we have in QM to make this trivial > > > > > > Martin Phillips > > Ladybridge Systems Ltd > > 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England > > +44 (0)1604-709200 > > > > > > > > -Original Message- > From: u2-users-boun...@listserver.u2ug.org [mailto: > u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson > Sent: 02 July 2013 01:36 > To: u2-users@listserver.u2ug.org > Subject: [U2] Running total > > > > Teach me again how to do a running total in a Access/Recall/English report. > > I haven't done one in years, but I seem to recall that it's possible. > > > > > > ___ > > U2-Users mailing list > > <mailto:U2-Users@listserver.u2ug.org> U2-Users@listserver.u2ug.org > > <http://listserver.u2ug.org/mailman/listinfo/u2-users> > http://listserver.u2ug.org/mailman/listinfo/u2-users > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > -- Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Phone: + 64 9 360 5310 Mobile: + 64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Here is what I use: SUBROUTINE RUNNING_TOTAL(CUR.TOT, AM.PTR, AMT, RESET.DATA) * RUNNING_TOTAL Keeps a Running Total for Reports * by David A. Green -- 9/12/01 * COMMON /RUNTOT/ RUNTOT.REC(10) * EQUATE RUNTOT.FLAG TO RUNTOT.REC(1) EQUATE RUNTOT.TOTS TO RUNTOT.REC(2) EQUATE RUNTOT.LAST TO RUNTOT.REC(3) * TEST.FLAG = @DATE:@TIME * IF TEST.FLAG # RUNTOT.FLAG THEN RUNTOT.FLAG = TEST.FLAG RUNTOT.TOTS = "" RUNTOT.LAST = "" END * IF RESET.DATA # RUNTOT.LAST THEN RUNTOT.LAST = RESET.DATA RUNTOT.TOTS = 0 END * RUNTOT.TOTS += AMT CUR.TOT = RUNTOT.TOTS * RETURN Your formula for the I-Descriptor is: SUBR("RUNNING_TOTAL", n, Dict_Name, Reset_Dict_Name) Where n is a unique number for the Query statement, so you can have more than one running total per query. Dict_Name is the Dictionary Name to use for Totalling. Reset_Dict_Name is the Dictionary Name for 'Zeroing out' the Totals when it changes values. If you don't wish to 'Zero out' the totals then use "". Note: The reset option only works on presorted data! Technical: Running Total supports Multi-Values. For optimal performance use smaller unique numbers like 1, 2, etc. David A. Green (480) 813-1725 DAG Consulting -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: Monday, July 01, 2013 5:36 PM To: u2-users@listserver.u2ug.org Subject: [U2] Running total Teach me again how to do a running total in a Access/Recall/English report. I haven't done one in years, but I seem to recall that it's possible. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
I was on a project where out of fourteen PICK programmers two of us could fix I descriptors. (Yes I was one of the two) Just an aside I found particularly interesting. -Original Message- From: Charles Stevenson To: U2 Users List Sent: Tue, Jul 2, 2013 10:08 am Subject: Re: [U2] Running total Martin, True, you might need mv-handling subrs for mv fields. Which are always fun. (I hate to concede that correlatives might actually be better at something, but I do wish there were a way to write a variation of an I-descriptor where you could code single value logic, with the value looping implied, like *cough* correlatives do. There, I said it. It's in writing. On the internet.) But, Martin, the method does NOT fail if you have multiple I-descriptors. It did on PI, but not on UV. UV uses seperate @-buffers for each I-descriptor, insulating i-descriptors from each other. I don't think the method works on UD at all. Tongue firmly in cheek, where it still hurts from biting it praising correlatives: The downside is you can't do fancy things like pass information between I-descriptors via @-buffers like you could on PI. That kind of i-descriptor hotshot programming was excellent for job security because no one else had a hope of deciphering it. When I was young I explored the outer limits before settling on a reasonable mix of when to write a subroutine and when to do everything in native I-descriptor line 2. I wonder how long it took Lynden to undo some of that after I left? (Be gentle now, Rick.) George's remarks about presorting are spot-on. For breakpoints: @NB, & TOTAL() with keyword CALC are your friends. They should be in everyone's RetrieVe & uniQuery repertoire. Chuck On 7/2/2013 3:48 PM, Martin Phillips wrote: > Hmmm. > > Simpler than my approach but it fails with multivalues or with queries that have other I-types in them. > > > Martin > > -Original Message- > From: u2-users-boun...@listserver.u2ug.org > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson > Sent: 02 July 2013 13:07 > To: U2 Users List > Subject: Re: [U2] Running total > > LIST NEWACC BYTES EVAL "BYTES+@2;@" > VOC. Bytes.. BYTES+@2;@ > > ADDX 47 47 > CHDIR 53100 > ENDPAGE 54154 > LNUM 64218 > > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Martin, True, you might need mv-handling subrs for mv fields. Which are always fun. (I hate to concede that correlatives might actually be better at something, but I do wish there were a way to write a variation of an I-descriptor where you could code single value logic, with the value looping implied, like *cough* correlatives do. There, I said it. It's in writing. On the internet.) But, Martin, the method does NOT fail if you have multiple I-descriptors. It did on PI, but not on UV. UV uses seperate @-buffers for each I-descriptor, insulating i-descriptors from each other. I don't think the method works on UD at all. Tongue firmly in cheek, where it still hurts from biting it praising correlatives: The downside is you can't do fancy things like pass information between I-descriptors via @-buffers like you could on PI. That kind of i-descriptor hotshot programming was excellent for job security because no one else had a hope of deciphering it. When I was young I explored the outer limits before settling on a reasonable mix of when to write a subroutine and when to do everything in native I-descriptor line 2. I wonder how long it took Lynden to undo some of that after I left? (Be gentle now, Rick.) George's remarks about presorting are spot-on. For breakpoints: @NB, & TOTAL() with keyword CALC are your friends. They should be in everyone's RetrieVe & uniQuery repertoire. Chuck On 7/2/2013 3:48 PM, Martin Phillips wrote: Hmmm. Simpler than my approach but it fails with multivalues or with queries that have other I-types in them. Martin -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson Sent: 02 July 2013 13:07 To: U2 Users List Subject: Re: [U2] Running total LIST NEWACC BYTES EVAL "BYTES+@2;@" VOC. Bytes.. BYTES+@2;@ ADDX 47 47 CHDIR 53100 ENDPAGE 54154 LNUM 64218 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
I also believe you have to presort before you do the LIST. Otherwise I think it does the totaling first, Then it does the sort. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Martin Phillips Sent: Tuesday, July 02, 2013 8:49 AM To: 'U2 Users List' Subject: Re: [U2] Running total Hmmm. Simpler than my approach but it fails with multivalues or with queries that have other I-types in them. Martin -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson Sent: 02 July 2013 13:07 To: U2 Users List Subject: Re: [U2] Running total LIST NEWACC BYTES EVAL "BYTES+@2;@" VOC. Bytes.. BYTES+@2;@ ADDX 47 47 CHDIR 53100 ENDPAGE 54154 LNUM 64218 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Hmmm. Simpler than my approach but it fails with multivalues or with queries that have other I-types in them. Martin -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson Sent: 02 July 2013 13:07 To: U2 Users List Subject: Re: [U2] Running total LIST NEWACC BYTES EVAL "BYTES+@2;@" VOC. Bytes.. BYTES+@2;@ ADDX 47 47 CHDIR 53100 ENDPAGE 54154 LNUM 64218 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
LIST NEWACC BYTES EVAL "BYTES+@2;@" VOC. Bytes.. BYTES+@2;@ ADDX 47 47 CHDIR 53100 ENDPAGE 54154 LNUM 64218 On 7/2/2013 11:29 AM, Martin Phillips wrote: Hi, As far as I know, the only way to do this in U2 is to use either a common variable or one of the @USERn variables in a subroutine to accumulate the result. Handling multi-values is not hard (as below). Getting this to work for breakpoint lines is a bit more awkward. For example, using UniVerse's demonstration sales database (INITIALIZE.DEMO), I can create an I-type named ACCUM that reads I subr('ACCUMULATE', ITEM.TOTAL) MD2 Cumulative 8R M BOUGHT and a program catalogued as ACCUMULATE function accumulate(item) common /total/tot if @ni = 1 then tot = 0 x = '' n = dcount(item, @vm) for i = 1 to n tot += item<1,i> x<1,i> = tot next i return (x) end I can then do LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM @ID.. Product No Sell. Qty. Item Total Cumulative 10002 605 $40.00 1 $40.00 40.00 501 $5.00 1 $5.00 45.00 502 $5.00 1 $5.00 50.00 504 $5.00 1 $5.00 55.00 10006 112 $6.00 3 $18.00 73.00 10004 704$115.00 1 $115.00 188.00 301 $10.00 9 $90.00 278.00 10005 502 $5.00 9 $45.00 323.00 10003 202 $5.0010 $50.00 373.00 204 $5.0010 $50.00 423.00 10001 112 $6.00 7 $42.00 465.00 418 $27.00 4 $108.00 573.00 704$115.00 1 $115.00 688.00 10007 301 $10.00 3 $30.00 718.00 Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier keyword that we have in QM to make this trivial Martin Phillips Ladybridge Systems Ltd 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England +44 (0)1604-709200 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: 02 July 2013 01:36 To: u2-users@listserver.u2ug.org Subject: [U2] Running total Teach me again how to do a running total in a Access/Recall/English report. I haven't done one in years, but I seem to recall that it's possible. ___ U2-Users mailing list <mailto:U2-Users@listserver.u2ug.org> U2-Users@listserver.u2ug.org <http://listserver.u2ug.org/mailman/listinfo/u2-users> http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total
Hi, As far as I know, the only way to do this in U2 is to use either a common variable or one of the @USERn variables in a subroutine to accumulate the result. Handling multi-values is not hard (as below). Getting this to work for breakpoint lines is a bit more awkward. For example, using UniVerse's demonstration sales database (INITIALIZE.DEMO), I can create an I-type named ACCUM that reads I subr('ACCUMULATE', ITEM.TOTAL) MD2 Cumulative 8R M BOUGHT and a program catalogued as ACCUMULATE function accumulate(item) common /total/tot if @ni = 1 then tot = 0 x = '' n = dcount(item, @vm) for i = 1 to n tot += item<1,i> x<1,i> = tot next i return (x) end I can then do LIST ORDERS PROD.NO SELL QTY ITEM.TOTAL ACCUM @ID.. Product No Sell. Qty. Item Total Cumulative 10002 605 $40.00 1 $40.00 40.00 501 $5.00 1 $5.00 45.00 502 $5.00 1 $5.00 50.00 504 $5.00 1 $5.00 55.00 10006 112 $6.00 3 $18.00 73.00 10004 704$115.00 1 $115.00 188.00 301 $10.00 9 $90.00 278.00 10005 502 $5.00 9 $45.00 323.00 10003 202 $5.0010 $50.00 373.00 204 $5.0010 $50.00 423.00 10001 112 $6.00 7 $42.00 465.00 418 $27.00 4 $108.00 573.00 704$115.00 1 $115.00 688.00 10007 301 $10.00 3 $30.00 718.00 Maybe Rocket can be persuaded to implement the CUMULATIVE field modifier keyword that we have in QM to make this trivial Martin Phillips Ladybridge Systems Ltd 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England +44 (0)1604-709200 -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: 02 July 2013 01:36 To: u2-users@listserver.u2ug.org Subject: [U2] Running total Teach me again how to do a running total in a Access/Recall/English report. I haven't done one in years, but I seem to recall that it's possible. ___ U2-Users mailing list <mailto:U2-Users@listserver.u2ug.org> U2-Users@listserver.u2ug.org <http://listserver.u2ug.org/mailman/listinfo/u2-users> http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Running total
Teach me again how to do a running total in a Access/Recall/English report. I haven't done one in years, but I seem to recall that it's possible. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total from UniData
Thanks, Kebbon. Why didn't I think about that?! Welcome to UD, where stupid things trip me up every day. :-) Bill Kebbon Irwin said the following on 7/24/2009 4:53 AM: I found that you had to take two steps, first an SSELECT to establish your order, followed by a LIST (or a sort with the same criteria, but it's unnecessary in Unidata, even using break-ons and det.supp's). I was able to get my daily summary of order values with running totals. LIST ORDERS BREAK.ON ORDER.DATE NUM.ORDERS TOTAL ONE TOTAL ORDER.AMT RUNNING.TOTAL.AMT DET.SUPP ID.SUPP Again, many thanks to all who responded. Cheers, Kebbon Date: Thu, 23 Jul 2009 17:01:28 -0700 From: wphask...@advantos.net To: U2-users@listserver.u2ug.org Subject: [U2] [Fwd: Re: FW: Running total from UniData dict] Unfortunately, in UD the @ITEM.COUNT calculates values for LIST only. Therefore, if you do a SORT the 1st item listed may have an item count of 5675, the second listed might be 352, etc. Thus, it's very hard to figure out when you're starting the list in order to initialize the named common variables. Bill Brian Leach said the following on 7/23/2009 9:38 AM: [snipped] ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total from UniVerse dict: THANKS!
It works! I have been back to the manuals, and would NEVER have found it there. Talks about @n as the result of the nth compound expression, but not as @1 as the result of the previous line. Help greatly appreciated - what a fabulous resource. Hi Kate, Try this... This will show the running total for every printed line ED DICT FILENAME RUNNING.TOTAL This is a Type "I" Descriptor last compiled on 30/06/09 at 09:07. 20 lines long. : P7 0001: I 0002: @1...@record<8> 0003: MD2 0004: RUNNING TOT 0005: 10R Regards -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kate Stanton Sent: Tuesday, 30 June 2009 9:55 AM To: U2 Users List Subject: [U2] Running total from UniVerse dict I am sure we used to be able to do this using I-type, but I cannot remember how. Now we are using I-types again (not just ocreelatives), I want to be able to show each item outstanding for an account, with a running balance. Can anyone help? I have been to the doc, and read about CALC and TOTAL, but they seem to apply to totalling lines (and I can't make that work either - I am feeling very inadequate). TIA, Kate Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Ph: +64 9 360 5310 Fax: +64 9 376 0750 Mobile: +64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Message protected by DealerGuard: e-mail anti-virus, anti-spam and content filtering. http://www.pentanasolutions.com Click here to report this message as spam: https://login.mailguard.com.au/report/1xLyloqUd9/dBLuI50jon61fjTIRoMZh/0 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total from UniVerse dict
Hi Kate I believe you are looking for the @ variables to solve your problem. I think in the uv help they come under the @ in the same area as the screen commands Regards David Jordan ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Running total from UniVerse dict
Hi Kate, Try this... This will show the running total for every printed line >ED DICT FILENAME RUNNING.TOTAL This is a Type "I" Descriptor last compiled on 30/06/09 at 09:07. 20 lines long. : P7 0001: I 0002: @1...@record<8> 0003: MD2 0004: RUNNING TOT 0005: 10R Regards -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kate Stanton Sent: Tuesday, 30 June 2009 9:55 AM To: U2 Users List Subject: [U2] Running total from UniVerse dict I am sure we used to be able to do this using I-type, but I cannot remember how. Now we are using I-types again (not just ocreelatives), I want to be able to show each item outstanding for an account, with a running balance. Can anyone help? I have been to the doc, and read about CALC and TOTAL, but they seem to apply to totalling lines (and I can't make that work either - I am feeling very inadequate). TIA, Kate Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Ph: +64 9 360 5310 Fax: +64 9 376 0750 Mobile: +64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Message protected by DealerGuard: e-mail anti-virus, anti-spam and content filtering. http://www.pentanasolutions.com Click here to report this message as spam: https://login.mailguard.com.au/report/1xLyloqUd9/dBLuI50jon61fjTIRoMZh/0 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Running total from UniVerse dict
I am sure we used to be able to do this using I-type, but I cannot remember how. Now we are using I-types again (not just ocreelatives), I want to be able to show each item outstanding for an account, with a running balance. Can anyone help? I have been to the doc, and read about CALC and TOTAL, but they seem to apply to totalling lines (and I can't make that work either - I am feeling very inadequate). TIA, Kate Kate Stanton Walstan Systems Ltd 4 Kelmarna Ave, Herne Bay, Auckland 1011, New Zealand Ph: +64 9 360 5310 Fax: +64 9 376 0750 Mobile: +64 21 400 486 Email: k...@walstan.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users