ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakc_5.4.0.1/rzakcmstdfems.htm

209 lines
13 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="ERRMSG (Error Message) and ERRMSGID (Error Message Identifier) keywords for display files" />
<meta name="abstract" content="Use one of these field-level keywords to identify a message to be displayed on the message line and associated with this field." />
<meta name="description" content="Use one of these field-level keywords to identify a message to be displayed on the message line and associated with this field." />
<meta name="DC.subject" content="ERRMSG (Error Message) keyword, Error Message (ERRMSG) keyword, ERRMSGID (Error Message Identifier) keyword, Error Message Identifier (ERRMSGID) keyword" />
<meta name="keywords" content="ERRMSG (Error Message) keyword, Error Message (ERRMSG) keyword, ERRMSGID (Error Message Identifier) keyword, Error Message Identifier (ERRMSGID) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstdfcolor.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakcmstdfems" />
<meta name="DC.Language" content="en-us" />
<!-- 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. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>ERRMSG (Error Message) and ERRMSGID (Error Message Identifier) keywords
for display files</title>
</head>
<body id="rzakcmstdfems"><a name="rzakcmstdfems"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">ERRMSG (Error Message) and ERRMSGID (Error Message Identifier) keywords
for display files</h1>
<div><p>Use one of these field-level keywords to identify a message to
be displayed on the message line and associated with this field.</p>
<div class="section"><p>A warning message appears at file creation time if either of these
keywords is specified on a record with the DSPMOD keyword. At run time, these
keywords are ignored when the display mode changes.</p>
<p>Option indicators
are valid for these keywords.</p>
</div>
<div class="section"><h4 class="sectiontitle">ERRMSG keyword</h4><div class="p">The format of the keyword is: <pre>ERRMSG('message-text' [response-indicator])</pre>
</div>
<p>For
ERRMSG, the parameters specify the message text and, optionally, a response
indicator. The message text is the message to be displayed. (The Help key
is not supported. Message help is not displayed when the Help key is pressed.)</p>
<p>If
you specify a response indicator, it should be the same as the option indicator
used to condition ERRMSG. On the input operation that follows the display
of the error message, the <span class="keyword">i5/OS™</span> operating
system turns off the indicator. If the response and the option indicators
are the same, they are both turned off. One exception to this rule is if the
response indicator is also specified for another keyword, such as CHANGE,
CAnn, or CFnn. In that case, the on/off setting of the response indicator
is based on the results of the function provided by the CHANGE or CFnn keyword.
When a response indicator is specified, the first 50 characters of the message
are also used as indicator text. Separate response indicator text is not valid
for the ERRMSG keyword.</p>
</div>
<div class="section"><h4 class="sectiontitle">ERRMSGID keyword</h4><div class="p">The format of the keyword is: <pre>ERRMSGID(msgid [library-name/]msg-file [response-indicator] [&amp;msg-data])</pre>
</div>
<p>For ERRMSGID, the parameters specify:</p>
<ul><li>The message identifier for the message to be displayed</li>
<li>The message file and, optionally, the library</li>
<li>Optionally, a response indicator</li>
<li>Optionally, a msg-data field name</li>
</ul>
<p>The response indicator, if specified, should be the same as the option
indicator used to condition the ERRMSGID keyword. On the subsequent input
operation, after the display of the error message, the <span class="keyword">i5/OS</span> operating
system turns off the indicator. However, if the response indicator is also
specified on another keyword, such as CHANGE, CAnn, or CFnn, the on/off setting
of the response indicator is based on the results of the function provided
by the CHANGE, CAnn, or CFnn keyword.</p>
<div class="note"><span class="notetitle">Note:</span> Indicator text cannot be specified
on the ERRMSGID keyword.</div>
<p>The msg-data field, if specified, contains
the replacement text for the specified message. The field must exist in the
record format and the field must be defined as a character field (data type
A) with usage P. For more information about how replacement text works, refer
to the Send Program Message (CL) command in the <a href="../rbam6/rbam6clmain.htm" target="_blank">Control language</a> topic.</p>
</div>
<div class="section"><h4 class="sectiontitle">Priority among selected keywords</h4><p>You can specify
ERRMSG and ERRMSGID more than once for a single field. During program processing,
use option indicators to select a particular message to be displayed.</p>
<p>Only
one message can be displayed at one time even if messages are in effect for
several fields on the same output operation. The field whose message is displayed
is the first field for which the program selected a message.</p>
<p>If
several keywords are in effect for one field on an output operation, the message
to be displayed is the first of the following keywords:</p>
<ul><li>ERRMSG (If more than one ERRMSG keyword is selected, the first one the
program selects is displayed.)</li>
<li>ERRMSGID (If more than one ERRMSGID keyword is selected, the first one
the program selects is displayed.)</li>
</ul>
<p>A message field is displayed only if no error message keywords are
also to be displayed.</p>
<p>For a list of priorities including the SFLMSG
and SFLMSGID keywords, see SFLMSG (Subfile Message) and SFLMSGID (Subfile
Message Identifier) keywords for display files.</p>
</div>
<div class="section"><h4 class="sectiontitle">Conditions occurring during message display</h4><p>The
displaying of a message using ERRMSG and ERRMSGID is similar to the displaying
of messages by the <span class="keyword">i5/OS</span> operating
system when field validation errors are detected.</p>
<p>When a message is
displayed because of either the ERRMSG or the ERRMSGID keyword, all fields
on the display are kept, including the field the message is associated with.
Except for option indicators, data in the output buffer is ignored (that is,
any new data from the program is not sent to the display).</p>
<p>The function
keys valid following display of a message are:</p>
<ul><li>Function keys specified at the file level</li>
<li>Function keys specified for the record format for which a message is displayed,
if selected when the message is displayed</li>
</ul>
<div class="p">When the message is displayed, the following conditions occur: <ul><li>For all errors: <ul><li>The message is highlighted.</li>
<li>The cursor is blinked and the keyboard locked until the workstation user
presses the Reset key.</li>
</ul>
</li>
<li>For errors associated with input-capable fields: <ul><li>All fields in error are displayed with their images reversed. <p>If a
field in error has both the underline (UL) display attribute and the highlight
(HI) attribute or the underline (UL) attribute and COLOR(BLU, WHT, or YLW)
specified, its image is not reversed.</p>
</li>
<li>The cursor is repositioned to the first displayed field that is in error.</li>
</ul>
</li>
<li>For errors associated with output-only fields: <ul><li>The display attribute of the field is not changed.</li>
<li>The cursor is not positioned to the field (it does not change position).</li>
</ul>
</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> Some display attributes can cause fields on the IBM<sup>®</sup> Color Display
Station to appear as color fields.</div>
</div>
</div>
<div class="section" id="rzakcmstdfems__rrif"><a name="rzakcmstdfems__rrif"><!-- --></a><h4 class="sectiontitle">Restoration of reversed image fields</h4><div class="p">Fields
are displayed with their images reversed because of system-detected typing
errors or because of the ERRMSG or the ERRMSGID keyword. Generally, the <span class="keyword">i5/OS</span> program restores the image
on the next I/O operation to the display, typically the next request from
your program. The restoration is done before the requested function is performed.
The following list shows exceptions where requests from your program do not
cause the <span class="keyword">i5/OS</span> operating
system to restore reversed image fields: <ul><li>An input request with cancel (canceling a read operation with NOWAIT)</li>
<li>A close request when the KEEP keyword is in effect</li>
<li>Any request to a subfile record (no data is sent to the device)</li>
<li>An output operation to a subfile control record format that does not display
the subfile control record or subfile records (for example, clearing, deleting,
or initializing the subfile)</li>
</ul>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Restrictions and notes</h4><ul><li>When an ERRMSG or ERRMSGID keyword is in effect, no processing other than
the processing for these keywords is performed for the record. If neither
keyword is in effect, the record is processed in the normal manner.</li>
<li>When the RMVWDW keyword is active, error messages are not displayed.</li>
<li>ERRMSG and ERRMSGID are valid for output-only, input-only, or input/output
fields. These two keywords cannot be specified for a constant, hidden, program-to-system,
or message field.</li>
<li>For input or output capable fields, ERRMSG and ERRMSGID are in effect
only if the record containing the field for which they are specified is already
on the display.</li>
<li>ERRMSG and ERRMSGID cannot be specified in a subfile record format (SFL
keyword specified). To display error messages for a subfile, see SFLMSG (Subfile
Message) and SFLMSGID (Subfile Message Identifier) keywords for display files.</li>
<li>ERRMSG and ERRMSGID are ignored if the variable start line number (SLNO(*VAR)
specified) has changed since the last output operation.</li>
<li>If
you specify ERRMSG or ERRMSGID, you should also specify RSTDSP(*YES) on the
Create Display File (CRTDSPF) or Change Display File (CHGDSPF) command. Otherwise,
data on the display can be lost if the file is suspended.</li>
<li>On an output operation that causes the display modes to be changed, ERRMSG
and ERRMSGID are ignored.</li>
</ul>
</div>
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
the ERRMSG and ERRMSGID keywords.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A R CUSMST
00020A :
00030A :
00040A :
00050A QTYORD 10A I 5 3
00060A 61 ERRMSG('No stock available' 61)
00070A 62 ERRMSG('Partial stock available' +
00080A 62)
00090A 63 ERRMSGID(MSG2000 CONSOLEMSG 63 +
00100A &amp;RPLTXT);
00110A RPLTXT 78A P
A</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstkeyent.htm" title="You type the keyword entries that define display files in positions 45 through 80 (functions).">DDS keyword entries for display files (positions 45 through 80)</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzakcmstdfcolor.htm" title="Use this keyword to specify the color of a field on a color display.">COLOR (Color) keyword for display files</a></div>
</div>
</div>
</body>
</html>