Barbara,

1) Out of curiosity, why is DUMP disallowed in the ON-EXIT block?

2) Can this limitation be circumvented simply by using a subroutine from within the block?

-mark

On 10/11/2017 5:05 PM, Barbara Morris wrote:
On 2017-10-11 1:45 PM, Buck Calabro wrote:
...
dcl-proc...

ON-EXIT;
QsyReleaseProfileHandle(profile_current_handle: errorStruc);
if err_use <> 0;
dump(a) 'release current';
endif;
...
end-proc;

DUMP is disallowed by RNF0203 (in capital letters, no less!) What do
other RPGers think about this programming pattern? How do you handle
post failure diagnosis? Log4RPG? Spooled file? CEE4RAGE + *NEW
activation group?


I'm guessing you're only interested in the dump output if the procedure failed due to an exception, and not if the procedure was cancelled due to the debug session ending or the subsystem ending or whatever.

So you could use both MONITOR and ON-EXIT. Keep your error reporting and DUMP in the ON-ERROR in the main part of the procedure, and just put the cleanup stuff like releasing the profile handle in the ON-EXIT.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.