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



Hi chaps,

I have a condition handler program written in RPG. This program is supposed to allow us to gracefully handle exceptions as they occur. In most cases (such as batch jobs) we simply log the exception, send an email to the helpdesk (with the call stack, various module dumps, and job info as attachments) and end the job.

Now, in the case of a file locking problem (CPF5027 followed by RNX1218) within an interactive job I have a problem:

In normal circumstances (no condition handlers, direct monitors, or *PSSR at higher level) the system would issue CPF5027 twice, and then issue RNX1218 as a *ESCAPE message to the program attempting to allocate the record. This would be unhandled in this situation so another RNX1218 would be sent as a *INQ to the user. The user would get a Retry option and all would be cool.

I want to be able to handle this exception without displaying the black-n-white InqMsg screen to the user. I also don't want the user to be able to cancel out by pressing Enter accidentally. I thought I'd be able to receive the message and reply to it without displaying the black screen-of-death. Now, when using the condition handler I don't get to see the CPF5027 messages as the system automatically replies to them. I do get the RNX1218 *ESCAPE message. I want to handle this and force a retry, but I don't know if this allows a retry - no replies listed. If I don't handle this message and simply issue a resume then a RNX1218 *INQ message is subsequently issued - to the workstation. I don't get to see that one within my program - but it has the retry option!

How can I handle the RNX1218 *ESCAPE message to force a retry of the record lock without simply ignoring it and causing the standard black-n-white screen to appear - forcing the user to decide?

Your help in this matter is most welcome.

Cheers

Larry Ducie

P.S. As an incentive, once my work on this is complete and in production I will post the code of my program which writes a (semi) formatted dump of any module located within the call-stack. no need for the DUMP opcode. Pass it the name of ANY module in ANY of your programs/service programs and it will format a dump for you.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.