System i: Programming Message Handling APIs - IBM
System i: Programming Message Handling APIs - IBM
System i: Programming Message Handling APIs - IBM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>APIs</strong><br />
These are the <strong>APIs</strong> for this category.<br />
Change Exception <strong>Message</strong> (QMHCHGEM) API<br />
Required Parameter Group:<br />
1 Invocation pointer Input Pointer<br />
2 Call stack counter Input Binary(4)<br />
3 <strong>Message</strong> key Input Char(4)<br />
4 Modification option Input Char(10)<br />
5 Reply text Input Char(*)<br />
6 Reply text length Input Binary(4)<br />
7 Error code I/O Char(*)<br />
Default Public Authority: *USE<br />
Threadsafe: Yes<br />
The Change Exception <strong>Message</strong> (QMHCHGEM) API changes an exception message on a call message<br />
queue. This API allows the current program to perform one of the following actions on an exception<br />
message that was sent to its caller, a previous caller, or itself:<br />
v Handle the escape, status, or notify message. If the exception is a notify message that has not already<br />
received a reply, return the default reply.<br />
v If it is a notify message that has not been replied to, return a reply to the call stack entry that sent this<br />
message. Handle the exception.<br />
v Handle the escape, status, or notify message and remove it from the job log. If the exception is a notify<br />
message that has not been replied to, return its default reply or another reply to the call stack entry<br />
that sent it.<br />
Authorities and Locks<br />
None.<br />
Required Parameter Group<br />
Invocation pointer<br />
INPUT; POINTER<br />
The invocation pointer to the call stack entry to which the exception message was sent. When<br />
using a value other than 0 for the call stack counter parameter, the invocation pointer points to<br />
the call stack entry from which to start counting in the call stack. This is the location of the call<br />
stack entry that received the exception message that was sent. The call stack entry you specify<br />
must be in the call stack. A null invocation pointer may be specified. If this pointer is not set, the<br />
call stack entry that called the QMHCHGEM API is used.<br />
Call stack counter<br />
INPUT; BINARY(4)<br />
A number that identifies the location in the call stack of the call stack entry that received the<br />
message you are changing. The number is relative to the call stack entry specified in the<br />
invocation pointer parameter. The number indicates how many calls earlier in the call stack the<br />
call stack entry is from the one specified in the invocation pointer parameter. Valid values follow:<br />
0 Change a message in the message queue of the call stack entry specified in the invocation pointer parameter.<br />
1 Change a message in the message queue of the call stack entry that called the call stack entry specified in the<br />
invocation pointer parameter.<br />
<strong>Message</strong> <strong>Handling</strong> <strong>APIs</strong> 3