ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QMHSNDBM.htm

495 lines
14 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Send Break Message (QMHSNDBM) API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- MH1TEMP SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
<!-- RCHVMW2 on 26 Jan 1999 at 10:37:34 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited Oct 2001 by v2cdijab -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Send Break Message (QMHSNDBM) API</h2>
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Message text</td>
<td align="left" valign="top" width="15%">Input</td>
<td align="left" valign="top" width="25%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of message text</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Message type</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">List of qualified message queue names</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Array of Char(20)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Number of message queues</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Qualified name of the reply message queue</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(20)</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Optional Parameter:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">8</td>
<td align="left" valign="top" width="50%">Coded character set identifier</td>
<td align="left" valign="top" width="15%">Input</td>
<td align="left" valign="top" width="25%">Binary(4)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Send Break Message (QMHSNDBM) API sends an immediate message to a work
station message queue. This forces the message queue to be displayed,
interrupting whatever is on the user's display. A message delivered in this way
is called a <strong>break message</strong>. Use break messages to ensure that
users see important information, such as a warning to sign off before you shut
the system down for maintenance.</p>
<p>To keep break messages from interrupting a job, change the value of the
BRKMSG parameter of the Change Job (CHGJOB) command to either *NOTIFY or
*HOLD.</p>
<p>If your application attempts to diagnose and recover from errors, it might
need to take additional action when using the QMHSNDBM API. The QMHSNDBM API
sends a message to a list of message queues. When the API encounters an error
in sending your message to a message queue in the list, it sends a diagnostic
message to your program message queue. It then proceeds to the next message
queue in the list. After trying to send the message to all specified message
queues and if the API detected any errors, it returns a general escape message
CPF2469. This message is returned as an exception or in the error code.</p>
<p>To diagnose and recover from these errors, your program should call the
QMHRCVPM API to receive the diagnostic messages sent.</p>
<br>
<h3>Authorities and Locks</h3>
<p>When the message type being sent is an inquiry, the sender needs the
following authority to the reply message queue:</p>
<dl>
<dt><em>Reply Message Queue Authority</em></dt>
<dd>*OBJOPR and *ADD</dd>
<dt><em>Reply Message Queue Library Authority</em></dt>
<dd>*EXECUTE</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Message text</strong></dt>
<dd>INPUT; CHAR(*)
<p> The complete text of the immediate message being sent. You cannot include
pointer data in this parameter.</p>
<p><strong><em>Coded Character Set Identifier (CCSID)
Considerations:</em></strong> The text supplied on the Message text
parameter is assumed to be in the CCSID of the job executing this API unless
the coded character set identifier is supplied in the CCSID parameter. For more
information about message handler and its use of CCSIDs, see <a href=
"../nls/rbagsccsidmsgsup2.htm">CCSIDs: Message Support</a> in the Globalization
topic.</p>
</dd>
<dt><strong>Length of message text</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the message text, in bytes. Valid values are 1 through
6000.</p>
</dd>
<dt><strong>Message type</strong></dt>
<dd>INPUT; CHAR(10)
<p>The type of the message. You must specify one of these values:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*INFO</em></td>
<td align="left" valign="top">Informational. Conveys information <em>
without</em> asking for a reply.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*INQ</em></td>
<td align="left" valign="top">Inquiry. Conveys information <em>and</em> asks
for a reply.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>List of qualified message queue names</strong></dt>
<dd>INPUT; ARRAY of CHAR(20)
<p>A list of 1 through 50 work station message queues to which the message is
being sent, and the libraries in which they reside.</p>
<p>When you send an informational message, you can specify 1 through 50
specific message queues or use this special value for the message queue
name:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*ALLWS</em></td>
<td align="left" valign="top">All work station message queues. Use blanks for
the library name, do not specify any other message queues, and specify 1 for
the number of message queues parameter.</td>
</tr>
</table>
<p>When you send an inquiry message, specify only one message queue.</p>
<p>When you send an informational or inquiry message to a specific message
queue, use the first 10 characters for the message queue name. Use the second
10 characters for the library name.</p>
<p>You can use this special value for the library name:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*LIBL</em></td>
<td align="left" valign="top">The library list</td>
</tr>
</table>
<p>If you send a break message to a specific work station message queue and
that work station is not logged on, no error is returned. However, diagnostic
message CPF2429, Message to work station did not break, appears in the job
log.</p>
</dd>
<dt><strong>Number of message queues</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of message queues specified in the list of qualified message
queue names parameter.</p>
<p>For informational (*INFO) messages, valid values are 1 through 50.</p>
<p>For inquiry (*INQ) messages or when using the special value *ALLWS for the
message queue, you must specify 1.</p>
</dd>
<dt><strong>Qualified name of the reply message queue</strong></dt>
<dd>INPUT; CHAR(20)
<p>For an inquiry message, the name of the message queue to receive the reply
message, and the library in which it resides. The first 10 characters specify
the message queue, and the second 10 characters specify the library. You can
use this special value for the message queue name:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*PGMQ</em></td>
<td align="left" valign="top">The current call stack entry's call message
queue. Use blanks for the library name.</td>
</tr>
</table>
<p>You can use these special values for the library name:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*CURLIB</em></td>
<td align="left" valign="top">The job's current library</td>
</tr>
<tr>
<td align="left" valign="top"><em>*LIBL</em></td>
<td align="left" valign="top">The library list</td>
</tr>
</table>
<p>For an informational message, use blanks for this parameter. If you specify
a message queue, the API ignores it and does not return an error.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
</dd>
</dl>
<br>
<h3>Optional Parameter</h3>
<dl>
<dt><strong>Coded character set identifier</strong></dt>
<dd>INPUT; BINARY(4)
<p>The coded character set identifier (CCSID) that the supplied message text is
in. The following values are allowed:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">The message text is assumed in the CCSID of the
job running this API. This is the default value if this parameter is not
specified.</td>
</tr>
<tr>
<td align="left" valign="top"><em>65535</em></td>
<td align="left" valign="top">The message text will not be converted.</td>
</tr>
<tr>
<td align="left" valign="top"><em>CCSID</em></td>
<td align="left" valign="top">Specify a valid CCSID that your message text is
in. Valid values are between 1 and 65535. This API will validate the CCSID.
<p>For a list of valid CCSIDs, see <a href="../nls/rbagsccsidmsgsup2.htm">
CCSIDs: Message Support</a> in the Globalization topic.</p>
</td>
</tr>
</table>
</dd>
</dl>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top" width="15%">CPF24A2 E</td>
<td align="left" valign="top" width="85%">Value for number of message queues
not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B3 E</td>
<td align="left" valign="top">Message type &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td align="left" valign="top">Severe error while addressing parameter
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B6 E</td>
<td align="left" valign="top">Length of &amp;1, not valid for message text or
data.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2421 E</td>
<td align="left" valign="top">Message not sent. &amp;1 in &amp;2 not work
station message queue.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2428 E</td>
<td align="left" valign="top">Message queue parameter is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2429 E</td>
<td align="left" valign="top">Message to work station &amp;1 did not
break.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2469 E</td>
<td align="left" valign="top">Error occurred when sending message&amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2401 E</td>
<td align="left" valign="top">Not authorized to library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2403 E</td>
<td align="left" valign="top">Message queue &amp;1 in &amp;2 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2408 E</td>
<td align="left" valign="top">Not authorized to message queue &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2421 E</td>
<td align="left" valign="top">Message not sent. &amp;1 in &amp;2 not work
station message queue.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2460 E</td>
<td align="left" valign="top">Message queue &amp;1 could not be extended.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2467 E</td>
<td align="left" valign="top">&amp;3 message queue &amp;1 in library &amp;2
logically damaged.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2477 E</td>
<td align="left" valign="top">Message queue &amp;1 currently in use.</td>
</tr>
<tr>
<td align="left" valign="top">CPF247E E</td>
<td align="left" valign="top">CCSID &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2481 E</td>
<td align="left" valign="top">Work station message queue not available.</td>
</tr>
<tr>
<td align="left" valign="top">CPF8100 E</td>
<td align="left" valign="top">All CPF81xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9830 E</td>
<td align="left" valign="top">Cannot assign library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V2R1
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"mh1.htm">Message Handling APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
</body>
</html>