|
Joe, All just because the exception handling model on the 400 (escape messages) doesn't allow for automatic propagation up the call stack. You either handle it at the target of the escape message or the system takes over with some default handling. Because of that model your subroutine has to have knowledge of the top level entry point. That's unnecessary cohesion between the subroutine and the 'top level' point. Better would be the subroutine throwing an exception to it's caller (where's the RPG THROW opcode?). Let the caller decide to handle the exception or if it's ignored it gets automatically bubbled up to it's own caller. Eventually it would then reach your 'top level' point that would handle the exception. If it's not handled it would reach the top of the call stack and get some default handling like ending the job or breaking on QSYSOPR. Paul
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.