ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/setatnpgm.htm

182 lines
7.1 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>Set Attention Program (SETATNPGM)</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="SETATNPGM.Top_Of_Page"></a>
<h2>Set Attention Program (SETATNPGM)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>Interactive environments (*INTERACT *IPGM *IREXX *EXEC)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#SETATNPGM.PARAMETERS.TABLE">Parameters</a><br>
<a href="#SETATNPGM.COMMAND.EXAMPLES">Examples</a><br>
<a href="#SETATNPGM.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="SETATNPGM"></a>
<p>The Set Attention Program (SETATNPGM) command sets up a program that is called when the Attention key is pressed. The setting is in effect for this recursion level and lower levels if more programs are called, but it is no longer in effect if the job returns from this recursion level to the previous one. If the Attention key handler's status is on, the specified program is called when the key is pressed. No parameters are passed to the Attention key handler when it is called. The Attention handling program runs in the same process with the same job attributes, overrides, and group authorities as the program that issued the SETATNPGM command. However, program adopted authority is not carried over. The Attention handling program must not reside in an independent auxiliary storage pool (ASP). It must reside in the system ASP or a basic user ASP.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETATNPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SETATNPGM.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="3"><a href="#SETATNPGM.PGM"><b>PGM</b></a></td>
<td valign="top">Program</td>
<td valign="top">Single values: *CURRENT, *PRVINVLVL<br>Other values: <i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Program</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#SETATNPGM.SET"><b>SET</b></a></td>
<td valign="top">Set attention key</td>
<td valign="top"><b><u>*ON</u></b>, *OFF</td>
<td valign="top">Optional, Positional 2</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#SETATNPGM.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="SETATNPGM.PGM"></a>
<h3>Program (PGM)</h3>
<p>Specifies the qualified name of the program to be the Attention key handler at this recursion level.
</p>
<p>This is a required parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*CURRENT</b></dt>
<dd>The program name of the Attention key handler currently in effect is used as the value of this parameter.
</dd>
<dt><b>*PRVINVLVL</b></dt>
<dd>The Attention key handler in effect at the previous recursion level is reinstated as the Attention key handler at this recursion level. The <b>Set attention key (SET)</b> parameter is not allowed if this special value is specified, because the SET status of the previous recursion level is also reinstated. This option is used when a program has specified an Attention program and wants to revert back to a previous level.
</dd>
</dl>
<p><b>Qualifier 1: Program</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the Attention key handler program.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the thread's library list are searched until a match is found.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the library where the attention program is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETATNPGM.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SETATNPGM.SET"></a>
<h3>Set attention key (SET)</h3>
<p>Specifies whether the Attention key handler indicated in the <b>Program (PGM)</b> parameter is called when the Attention key is pressed. This parameter is not allowed if *PRVINVLVL is specified for the PGM parameter.
</p>
<dl>
<dt><b><u>*ON</u></b></dt>
<dd>The Attention key handler specified in the <b>Program</b> (PGM) parameter is called when the Attention key is pressed.
</dd>
<dt><b>*OFF</b></dt>
<dd>The Attention key handler specified in the <b>Program</b> (PGM) parameter is not called when the Attention key is pressed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETATNPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SETATNPGM.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Setting the ATTN Key Handler</b>
</p>
<p>
<pre>
SETATNPGM PGM(QGPL/ATTN) SET(*ON)
</pre>
</p>
<p>This command causes the program QGPL/ATTN to become the ATTN key handler. Because SET(*ON) is specified, the program is called when the ATTN key is pressed.
</p>
<p><b>Example 2: Setting the Attention Key Off</b>
</p>
<p>
<pre>
SETATNPGM PGM(*CURRENT) SET(*OFF)
</pre>
</p>
<p>The current attention handling program has its status changed to SET(*OFF). Because the status is SET(*OFF) when the ATTN key is pressed, the attention handling program is not called.
</p>
<p><b>Example 3: Previous Recursion-Level Support</b>
</p>
<p>
<pre>
SETATNPGM PGM(*PRVINVLVL)
</pre>
</p>
<p>The attention handling program and status that was in effect at the previous recursion level is reinstated at this recursion level. If no attention handler is in effect, after this command is run nothing happens when the ATTN key is pressed.
</p>
<p><b>Example 4: Emulating the System Request Key</b>
</p>
<p>
<pre>
SETATNPGM PGM(QWSSYSRQ)
</pre>
</p>
<p>The system-supplied program QWSSYSRQ will be called when the ATTN key is pressed. This system program allows the ATTN key to act as a system request key by showing the system request menu on the display when the ATTN key is pressed.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETATNPGM.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SETATNPGM.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF1318</b></dt>
<dd>Attention key program &amp;1 in &amp;2 not set.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SETATNPGM.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>