How to use API (QMHRCVPM)

Hi everyone... My first time to this site and I could use some help.
I'm trying to use the Receive Program Message API to retrieve an error message that I want to mail to a user.
Here's the scenario:
Program 1 calls Program 2 calls program 3 calls program 4
Program 4 has an unmonitored message that the operator replies to with a 'C' to cancel.
I want to send the text of the error to a user from Program 2. Program 4 is no longer in the stack because it has already been cancelled.
How can I retrieve the CPF message from Program 4 and use it in Program 2 ?
Thanks for any and all help.
Westdeb27

Answer Wiki

Best thing to do would be to catch the error in program 4 and handle it. If you want program 2 to handle it you can use QMHRSNEM (Resend escape message) to send the escape message up the call stack (either directly or ‘bubbling up’; see information about QMHRSNEM).

In the scenario you are describing, the exception is handled by the user through the inquiry message. When the user answers ‘C’ancel, program 4 is removed from the call stack and program 3 receives a new exception ‘Call to program 4 ended in error’. To find the original exception, you would have to examine the job log.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your response...

Discuss This Question: &nbsp

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

There was an error processing your information. Please try again later.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy

Processing your reply...

Ask a Question

Free Guide: Managing storage for virtual environments

Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy