× 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 2/2/2011 8:36 AM, David FOXWELL wrote:

Trying to debug a program that has failed. Unfortunately, on pressing
'G' the program restarts a procedure where the first instruction is
OPEN Myfile.

I don't think it's ever a good idea to use the 'G' response, even for debugging. Maybe even especially while debugging, since responding 'G' will usually just add new breakage to whatever problem is being debugged. (As you have just found.)

Branching to the *GETIN part of the RPG cycle was only ever useful for simple cycle programs that ran the detail calculations for each record in a file. The program was setup to run the detail calcs over and over, so it was ok to skip the remainder of the detail calcs for a bad record and start again for a new record.

For non cycle programs, skipping from a random error point in the middle of calculations to the *GETIN part of the RPG cycle never** makes sense.

In your case, even if you get past the OPEN error, there are probably other things that shouldn't be re-done and that will just cause more debugging confusion even if they don't cause an exception.

** Never? Well, hardly ev... yes ... never.


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.