|
Dan, The file exception routine comes into action when an error occurs that your program does not handle. As soon as you use an error extender or error indicator, your program 'handles' the error. The catch with an exception routine is that you get thrown back to the start of the mainline (there are a few options, but this is the most logical). That means your mainline gets cluttered with extra code; you have to be aware that you might be returning from an exception. What we do is: set a condition in the error routine; the first part of the mainline is not executed in case of error recovery; then we clear the condition and write the screen. Not very pretty, but it works. Joep Beckeringh ----- Original Message ----- From: "Dan" <dbcerpg@yahoo.com> To: <rpg400-l@midrange.com> Sent: Monday, November 25, 2002 7:16 PM Subject: RE: File Exception/Error Subroutine - INFSR > Buck, the MONITOR op group sounds like a good idea, once we upgrade > from v4r5. I'm not sure this group is ready for file I/O isolated in a > subroutine. One step at a time. > > What happens when a File Exception/Error Subroutine is defined for a > file and you check for %error right after a chain op? Will the "local" > %error test override the INFSR? > > TIA, Dan
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.