|
I'm sorry, but let me see if I understand this.... You're adding up a total on a report. And you don't mind the MOST SIGNIFICANT DIGITS being chopped off?? If one of my users ran a report on (lets say) sales for a quarter. The total came up to (for example) $1200500000. Would I really want my report to just list "500000"?? Since the program didn't crash, the user will assume that the computer is right. (They always do around here, and don't bother to bring things like this to my attention) If this is TRULY what you want, the "ADD" op-code in RPG IV does exactly the same thing that it did in RPG III. (Which, frankly, blows your entire "RPG III is looking better" attitude) But, really -- this is a programmer issue. You didn't allocate a large enough number to your totals. The program SHOULDN'T just throw away digits, without complaining, to do so would be to sacrifice the integrity of the report. After all, if the programmer wanted it to discard the leftmost digits, he would've coded it that way, using the ADD/SUB/MULT op-codes or using an internal work field that was large enough to hold the result! On Fri, 23 Jun 2000, keith mcintosh wrote: > Maybe someone from IBM T.O. could answer this. > > I am creating a report and adding up totals into an array. When I > eval the total into a Report Field I get a error. > > Message . . . . : The target for a numeric operation > is too small to hold the result (C G D F). > > Why does it give me a Hard Halt? and why is there no > "I"? > > Why would the system send a Message to qsysopr or have > a user cancel the program in the middle of a process > because a REPORT Field is To Small... > > I have "Truncate numeric . . . . . . . . *YES" > on the Create RPG Module. > > The field sizes are P(9,2) being put into a P(7,2) > report field. > > RPG III is looking better every time I use RPG IV. > > The Statement is > > C Eval RPITC1 = RptValx(1) > On v4r2m0. > > > K. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.