276 lines
12 KiB
HTML
276 lines
12 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Change S/36 Message List (CHGS36MSGL)</title>
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<a name="CHGS36MSGL.Top_Of_Page"></a>
|
|
<h2>Change S/36 Message List (CHGS36MSGL)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>
|
|
<ul><li>Batch job (*BATCH)</li>
|
|
<li>Interactive job (*INTERACT)</li>
|
|
</ul><b>Threadsafe: </b>No
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#CHGS36MSGL.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#CHGS36MSGL.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#CHGS36MSGL.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="CHGS36MSGL"></a>
|
|
<p>The Change System/36 Message List (CHGS36MSGL) command determines the action taken for specific escape messages issued by Control Language (CL) commands in a procedure running in the System/36 environment. It is also used to set the default action for escape messages that are not specified.
|
|
</p>
|
|
<p>This command is allowed to be external to a procedure only when SCOPE(*JOB) or SCOPE(*SESSION) is specified. It is not allowed in CL programs. It is valid only when the System/36 Environment is active.
|
|
</p>
|
|
<p>For System/36 environment jobs that are started by the JOBQ command, the // JOBQ OCL statement, or the // EVOKE OCL statement, the initial message default action is taken from the job level of the submitting job. For other jobs, it is taken from the System/36 environment configuration. The Change System/36 Configuration (CHGS36) command can be used to set the initial message default action in the configuration.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="CHGS36MSGL.PARAMETERS.TABLE">Parameters</a></h3>
|
|
<table border="1" cellpadding="4" cellspacing="0">
|
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
|
<tr>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="4"><a href="#CHGS36MSGL.MSGL"><b>MSGL</b></a></td>
|
|
<td valign="top">Message list</td>
|
|
<td valign="top">Single values: <b><u>*SAME</u></b>, *NONE<br>Other values (up to 100 repetitions): <i>Element list</i></td>
|
|
<td valign="top" rowspan="4">Optional, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Message list</td>
|
|
<td valign="top">
|
|
Values (up to 100 repetitions): <i>Name</i>, *ANY</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Action</td>
|
|
<td valign="top">
|
|
*CONTINUE, *IGNORE, *HALT, *CANCEL, *GOTO</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 3: Label or halt option</td>
|
|
<td valign="top">
|
|
<i>Character value</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#CHGS36MSGL.DFTACN"><b>DFTACN</b></a></td>
|
|
<td valign="top">Default action</td>
|
|
<td valign="top">Single values: <b><u>*SAME</u></b><br>Other values: <i>Element list</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Action</td>
|
|
<td valign="top">
|
|
*CONTINUE, *IGNORE, *HALT, *CANCEL, *GOTO</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Label or halt option</td>
|
|
<td valign="top">
|
|
<i>Character value</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGS36MSGL.SCOPE"><b>SCOPE</b></a></td>
|
|
<td valign="top">Scope</td>
|
|
<td valign="top"><b><u>*CURPRC</u></b>, *PRVPRC, *JOB, *SESSION</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="CHGS36MSGL.MSGL"></a>
|
|
<h3>Message list (MSGL)</h3>
|
|
<p>Specifies a list of message IDs and the action that is taken for each message. One or more message IDs can be specified along with the action that is taken for each message ID. When a CL command issues an escape message, the message list is searched for the message ID and the specified action is taken. If the message ID is not found in the message list, the default action is taken.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>The MSGL parameter can be specified only if SCOPE(*CURPRC) or SCOPE(*PRVPRC) is specified.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SAME</u></b></dt>
|
|
<dd>The message list does not change.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>The message list is removed.
|
|
</dd>
|
|
</dl>
|
|
<p>The possible Message ID Added to List values are:
|
|
</p>
|
|
<dl>
|
|
<dt><b>*ANY</b></dt>
|
|
<dd>The specified action is taken for any message ID that is not found previously in the message list. Because this value matches any message, it is the last message ID specified in the list. Message IDs specified after this value are ignored.
|
|
</dd>
|
|
<dt><b><i>message-ID</i></b></dt>
|
|
<dd>Specify the message ID being added to the list. Each message ID must contain 7 characters and must conform to the rules for message IDs. Generic message IDs are specified by ending the message ID with either 00 or 0000. For example, CPF1200 would match all messages beginning with CPF12, and CPF0000 would match all messages beginning with CPF.
|
|
<p>The message list is searched in the order that it is specified on the command. Therefore, if the message list contains more than one message ID that matches the message ID being searched for, the first one is used. For example, if the message list contains CPF1200 followed by CPF1234, and the message CPF1234 is being searched for, the generic message ID is found first, and the action specified for that message ID is taken.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
<p>The possible Action Taken for Message ID values are:
|
|
</p>
|
|
<dl>
|
|
<dt><b>*CONTINUE</b></dt>
|
|
<dd>Processing continues with the statement that follows the CL command. The ID of the escape message is saved, and can be retrieved by the ?MSGID? substitution expression.
|
|
</dd>
|
|
<dt><b>*IGNORE</b></dt>
|
|
<dd>Processing continues with the statement following the CL command. The ID of the escape message is not saved, and the ?MSGID? substitution expression is null.
|
|
</dd>
|
|
<dt><b>*HALT-options</b></dt>
|
|
<dd>A halt with options is issued. This value can be followed by a list of options to be allowed on the halt. If the options to be allowed are not specified, options 0 (continue) and 3 (cancel) are allowed. The list of options is a value consisting of up to 4 numbers ranging from 0 through 3. The valid values are:
|
|
<ul>
|
|
<li>0 - Continue. The ?MSGID? substitution expression is set.
|
|
</li>
|
|
<li>1 - Retry the command. The ?MSGID? substitution expression is not set.
|
|
</li>
|
|
<li>2 - Cancel the job step. The ?MSGID? substitution expression is set.
|
|
</li>
|
|
<li>3 - Cancel the job.
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
<dt><b>*CANCEL</b></dt>
|
|
<dd>The procedure is canceled as if a // CANCEL statement was processed.
|
|
</dd>
|
|
<dt><b>*GOTO-label</b></dt>
|
|
<dd>Control continues at the TAG label specified. This value must be followed by a label of up to 8 characters.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGS36MSGL.DFTACN"></a>
|
|
<h3>Default action (DFTACN)</h3>
|
|
<p>Specifies the default action taken for escape messages issued by CL commands in procedures that run in the System/36 environment. The default action is taken for any message that is not in the message list, or for any message if there is no message list. The default action is not used if the message list contains a message ID of *ANY.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SAME</u></b></dt>
|
|
<dd>The default action does not change.
|
|
</dd>
|
|
<dt><b>*CONTINUE</b></dt>
|
|
<dd>Processing continues with the statement that follows the CL command. The ID of the escape message is saved and can be retrieved by the ?MSGID? substitution expression.
|
|
</dd>
|
|
<dt><b>*IGNORE</b></dt>
|
|
<dd>Processing continues with the statement that follows the CL command. The ID of the escape message is not saved, and the ?MSGID? substitution expression is null.
|
|
</dd>
|
|
<dt><b>*HALT-options</b></dt>
|
|
<dd>Message SYS3827 is issued with options. This value can be followed by a list of options to be allowed on the halt. If the options to be allowed are not specified, options 0 (continue) and 3 (cancel) are allowed. The list of options is a value consisting of up to 4 numbers ranging from 0 through 3. The valid values are:
|
|
<ul>
|
|
<li>0 - Continue. The ?MSGID? substitution expression is set.
|
|
</li>
|
|
<li>1 - Retry the command. The ?MSGID? substitution expression is not set.
|
|
</li>
|
|
<li>2 - Cancel the job step. The ?MSGID? substitution expression is set.
|
|
</li>
|
|
<li>3 - Cancel the job.
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
<dt><b>*CANCEL</b></dt>
|
|
<dd>The procedure is canceled as if a // CANCEL statement was processed.
|
|
</dd>
|
|
<dt><b>*GOTO-label</b></dt>
|
|
<dd>Control continues at the specified TAG label. This value must be followed by a label of up to 8 characters.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGS36MSGL.SCOPE"></a>
|
|
<h3>Scope (SCOPE)</h3>
|
|
<p>Specifies the scope of the message list and default action entered on the command.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CURPRC</u></b></dt>
|
|
<dd>The message list and default action apply only to the procedure in which the command is placed. It is not passed on to lower level procedures or used after the procedure ends.
|
|
</dd>
|
|
<dt><b>*PRVPRC</b></dt>
|
|
<dd>The message list and default action apply only to the procedure that called the procedure in which the command is placed. This value can only be entered in a procedure but cannot be entered in a first-level procedure.
|
|
</dd>
|
|
<dt><b>*JOB</b></dt>
|
|
<dd>The default action applies to procedures in the current System/36 job. The default action specified applies to procedures in the current job that do not have a default action set. If *JOB is specified for this parameter, a message list is not allowed on the command.
|
|
</dd>
|
|
<dt><b>*SESSION</b></dt>
|
|
<dd>The default action applies to procedures run in the current session. If *SESSION is specified for this parameter, a message list is not allowed.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CHGS36MSGL.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Setting Up a Message List</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CHGS36MSGL MSGL(((CPF9801) *GOTO NOTEXIST)
|
|
((CPF9802 CPF9820) *GOTO NOTAUT)
|
|
((*ANY) *HALT 3))
|
|
CHKOBJ ?2?/?1? *PGM
|
|
// GOTO OK
|
|
// TAG NOTEXIST
|
|
(code to handle object does not exist messages)
|
|
// GOTO OK
|
|
// TAG NOTAUT
|
|
(code to handle not authorized to object messages)
|
|
// TAG OK
|
|
CHGS36MSGL MSGL(*NONE)
|
|
</pre>
|
|
</p>
|
|
<p>This command sets up a message list to go to label NOTEXIST if message CPF9801 is issued, and to label NOTAUT if either message CPF9802 or CPF9820 is issued. If any other message is entered, a halt with only option 3 (cancel) is issued. The second CHGS36MSGL command removes the message list.
|
|
</p>
|
|
<p><b>Example 2: Setting the ?MSGID? Substitution Expression</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CHGS36MSGL MSGL(((CPF2105) *IGNORE) ((*ANY) *CONTINUE))
|
|
DLTF ?FLIB?/?1?
|
|
// IFF ?MSGID?/ ... (handle error)
|
|
</pre>
|
|
</p>
|
|
<p>In this example, message CPF2105 (object not found) is ignored; that is, the ?MSGID? substitution expression is not set. For any other messages, the ?MSGID? substitution expression is set to the message ID. The procedure is attempting to delete a file that may or may not exist. Because the object not found exception is not considered an error in this case, it is ignored. Any other message is handled as an error.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CHGS36MSGL.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>SSP0520</b></dt>
|
|
<dd>System/36 environment is not active.
|
|
</dd>
|
|
<dt><b>SSP0521</b></dt>
|
|
<dd>Command is not allowed in first-level procedure.
|
|
</dd>
|
|
<dt><b>SSP0522</b></dt>
|
|
<dd>System/36 procedure is not active.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGS36MSGL.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|