× 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.



On 2010/9/29 12:05 PM, Pete Helgren wrote:

The error is: The target for a numeric operation is too small to hold
the result. So I know what the problem is. Unfortunately the program
isn't kind enough to says: The target (MYFIELD) for a numeric operation
is too small to hold the result. So I was hoping to find out what
*field* the program was complaining about.

So (this is NOT a BPCS question): How do I determine from the RPG dump
which field is too small? Since I cannot reconcile the statement number
to the source, I was hoping the dump would illuminate the problem. After
looking at the dump, there is so much information I can't sort out where
to begin looking.


I don't think you can determine anything from the dump.

Is the program debuggable with more than just a *STMT view? If so, strdbg and use the break statement to add a breakpoint on the reported statement. Run the program and it will break on the failing statement.

If not, can you recompile the program? If so, check the left-hand-side of the listing to see what source statement matches the failing statement number.

If you can't recompile it, and you only have a statement view, then you might be able to do some really tedious (really really really tedious) work in the debugger. Step through the program while guessing which source statements might match the statement numbers the debugger reports, and use EVAL to check which variables are being modified along the way to validate your guesses. You might actually be able to use the information from the dump too. And using EVAL %LOCALVARS in the debugger might also help, although it might give too much information.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.