On 2/17/2016 11:29 AM, Stephen Mooney wrote:
Charles,calculating the total for three months:
Thank you for your suggestion. I was using the SQL set function after
$Tot03 = ($AvgH(1) * $AvgH(2) * $AvgH(3))not large enough (set to 63P) and the program errs. Same happens with:
SET :$Geo03 = :$Tot03 ** (1/:$Root03);
And that works fine. When I try it with 12 month's, the result field is
$Tot12 = ($AvgH(1) * $AvgH(2) * $AvgH(3) *$AvgH(4) * $AvgH(5) * $AvgH(6) * $AvgH(7) * $AvgH(8)
* $AvgH(9) * $AvgH(10) * $AvgH(11) * $AvgH(12))
I think I need to use 'C' because if I declare the result field as"double" I do not have the restriction I do in RPG.
Regards, Stephen M. Mooney
RPG supports double as dcl-s bigNumber float(8);
Visit wiki.midrange.com and register for an account. Edit a page that
helps you, and because it's public, you'll help someone else, too!
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L)
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.