|
Yep due to the size and precision of the intermediate results in a complex EVAL statement. Check the archives and manuals for more info in addition to the following: H EXPROPTS(*MAXDIGITS | *RESDECPOS) EVAL(R) vs. EVAL(M) Also you can control intermediate results yourself using %DEC. Eval fld62 = %dec(fld42A + fld42A) HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of LioliosJG@xxxxxxxxxxxx Sent: Wednesday, November 02, 2005 10:21 AM To: rpg400-l@xxxxxxxxxxxx Subject: Eval op-code I was using the 'Eval' Op-code to add 39 fields which all had the attributes of 4 in length and 2 decimal places into a Total field of 6 in length and 2 decimal places. The problem that I was having is that the sum of the 39 field didn't include anything to the right of the decimal place in my 'Total' field unless the sum of the decimal places reached the next whole number. Example: Field 1 = 00.25 Field 2 = 02.25 Field 3 = 00.25 My Total would = 2.00 If I added a Field 4 = .25 then my Total would be 3.00 So I broke down the Eval and noticed the the maximum number of field I can use to get the correct decimal answer in my Total field was 29. Is this by design? Jim Liolios
As an Amazon Associate we earn from qualifying purchases.
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.