321 lines
8.8 KiB
HTML
321 lines
8.8 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">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Qp0zRunTerminal()--Run a Generic Terminal</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. -->
|
|
<!-- file cleaned -->
|
|
<!-- UNIX11 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2DCIJB at -->
|
|
<!-- RCHVMW2 on 1 Jun 1999 at 16:14:12 -->
|
|
<!--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>Qp0zRunTerminal()--Run a Generic Terminal</h2>
|
|
|
|
<div class="box" style="width: 60%;">
|
|
<br>
|
|
Syntax
|
|
|
|
<pre>
|
|
#include <qp0ztrml.h>
|
|
|
|
int Qp0zRunTerminal( Qp0z_Terminal_T <em>handle</em> );
|
|
</pre>
|
|
|
|
Service Program Name: QP0ZTRML<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: No<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The <strong>Qp0zRunTerminal()</strong> function runs the terminal specified
|
|
by <em>handle</em>. First, <strong>Qp0zRunTerminal()</strong> makes the
|
|
terminal window the active window on the display. Then, <strong>
|
|
Qp0zRunTerminal()</strong> waits for the user to enter input at the command
|
|
line, press a command key, or for output to become available from the
|
|
interpreter process. <strong>Qp0zRunTerminal()</strong> returns when either the
|
|
user presses F3, the user presses F12, or the interpreter process ends.</p>
|
|
|
|
<p>When the user enters input at the terminal command line, <strong>
|
|
Qp0zRunTerminal()</strong> writes the data to descriptor 0 in the interpreter
|
|
process. The data is terminated with a new line (0x25) character.</p>
|
|
|
|
<p>When a program in the interpreter process writes to descriptor 1 or 2,
|
|
<strong>Qp0zRunTerminal()</strong> displays the data in the output area of the
|
|
terminal window.</p>
|
|
|
|
<p>When the user presses one of the following command keys, <strong>
|
|
Qp0zRunTerminal()</strong> takes these actions:</p>
|
|
|
|
<dl>
|
|
<dt><strong>F3 (Exit)</strong></dt>
|
|
|
|
<dd>Returns to the caller with a return value of 1 (or QP0Z_TERMINAL_F3).<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F5 (Refresh)</strong></dt>
|
|
|
|
<dd>Refreshes the output area.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F6 (Print)</strong></dt>
|
|
|
|
<dd>Prints the output area to a QPRINT spool file.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F7 (Page up)</strong></dt>
|
|
|
|
<dd>Page up output area. If a number is on the command line, the output area is
|
|
rolled up by that number of lines.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F8 (Page down)</strong></dt>
|
|
|
|
<dd>Page down output area. If a number is on the command line, the output area
|
|
is rolled down by that number of lines.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F9 (Retrieve)</strong></dt>
|
|
|
|
<dd>Retrieve a previous command. If the key is pressed multiple times, it
|
|
retrieves previous commands from a buffer. For example, to retrieve the second
|
|
to last command, press the key two times. A specific command can be selected by
|
|
placing the cursor on that command and pressing the key. When the interactive
|
|
job is running in a double-byte CCSID, this key is not available.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F11 (Toggle line wrap)</strong></dt>
|
|
|
|
<dd>Toggles the line wrap/truncate mode in the output area. In line wrap mode,
|
|
lines longer than the width of the terminal window are wrapped to the next
|
|
line. In truncate mode, the portion of a line beyond the width of the terminal
|
|
window is not shown.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F12 (Return)</strong></dt>
|
|
|
|
<dd>Returns to the caller with a return value of 0 (or QP0Z_TERMINAL_F12).<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F13 (Clear)</strong></dt>
|
|
|
|
<dd>Clears the output area.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F14 (Adjust command line length)</strong></dt>
|
|
|
|
<dd>Adjust the command line length to four lines. If a number is on the command
|
|
line, the command line length is adjusted to that number of lines.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F17 (Top)</strong></dt>
|
|
|
|
<dd>Displays top of output area.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F18 (Bottom)</strong></dt>
|
|
|
|
<dd>Displays bottom of output area.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F19 (Left)</strong></dt>
|
|
|
|
<dd>Shifts the output area to the left. If a number is on the command line, the
|
|
output area is shifted by that number of columns.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F20 (Right)</strong></dt>
|
|
|
|
<dd>Shifts the output area to the right. If a number is on the command line,
|
|
the output area is shifted by that number of columns.<br><br>
|
|
</dd>
|
|
|
|
<dt><strong>F21 (CL command line)</strong></dt>
|
|
|
|
<dd>Displays a command entry window where the user can enter CL commands.<br>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>When the user enters System Request 2, <strong>Qp0zRunTerminal()</strong>
|
|
sends a SIGINT signal to the process group of the interpreter process.
|
|
</p>
|
|
|
|
<br>
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
<dt><strong><em>handle</em></strong></dt>
|
|
|
|
<dd>(Input) Handle for terminal.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Authorities</h3>
|
|
|
|
<p>None.</p>
|
|
|
|
<br>
|
|
<h3>Return Value</h3>
|
|
|
|
<dl>
|
|
<dt><em>0 (or QP0Z_TERMINAL_F12)</em></dt>
|
|
|
|
<dd><strong>Qp0zRunTerminal()</strong> was successful and the user pressed F12
|
|
to return.<br><br></dd>
|
|
|
|
<dt><em>1 (or QP0Z_TERMINAL_F3)</em></dt>
|
|
|
|
<dd><strong>Qp0zRunTerminal()</strong> was successful and the user pressed F3
|
|
to exit.<br><br></dd>
|
|
|
|
<dt><em>2 (or QP0Z_TERMINAL_ENDED)</em></dt>
|
|
|
|
<dd><strong>Qp0zRunTerminal()</strong> was successful and the interpreter
|
|
process ended.<br><br></dd>
|
|
|
|
<dt><em>value</em></dt>
|
|
|
|
<dd><strong>Qp0zRunTerminal()</strong> was not successful. The value returned
|
|
is an errno indicating the failure.</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Error Conditions</h3>
|
|
|
|
<p>If <strong>Qp0zRunTerminal()</strong> is not successful, the return value
|
|
usually indicates one of the following errors. Under some conditions, the
|
|
return value could indicate an error other than those listed here.</p>
|
|
|
|
<dl>
|
|
<dt><em>[EDESTROYED]</em></dt>
|
|
|
|
<dd><p>The mutex was destroyed.</p>
|
|
|
|
<p>A required object was destroyed.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EFAULT]</em></dt>
|
|
|
|
<dd><p>The address used for an argument is not correct.</p>
|
|
|
|
<p>In attempting to use an argument in a call, the system detected an address
|
|
that is not valid.</p>
|
|
|
|
<p>While attempting to access a parameter passed to this function, the system
|
|
detected an address that is not valid.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EINVAL]</em></dt>
|
|
|
|
<dd>The value specified for the argument is not correct.
|
|
|
|
<p>A function was passed incorrect argument values, or an operation was attempted
|
|
on an object and the operation specified is not supported for that type of
|
|
object.</p>
|
|
|
|
<p>An argument value is not valid, out of range, or NULL.</p>
|
|
|
|
<dt><em>[EIO]</em></dt>
|
|
|
|
<dd><p>Input/output error.</p>
|
|
|
|
<p>A physical I/O error occurred.</p>
|
|
|
|
<p>A referenced object may be damaged.</p>
|
|
</dd>
|
|
|
|
<dt><em>[EUNKNOWN]</em></dt>
|
|
|
|
<dd><p>Unknown system state.</p>
|
|
|
|
<p>The operation failed because of an unknown system state. See any messages in
|
|
the job log and correct any errors that are indicated, then retry the
|
|
operation.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3>Usage Notes</h3>
|
|
|
|
<ol>
|
|
<li>The default action for the SIGINT signal is to end the request. The program
|
|
running in the interpreter process can use a signal handler to catch the signal
|
|
and perform any necessary cleanup. See <a href="unix5a1.htm">Signals APIs</a>
|
|
for more information about signals.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li>The <<strong>qp0ztrml.h</strong>> file (see <a href="unix13.htm">
|
|
Header Files for UNIX-Type Functions</a>)<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="cntltrml.htm">Qp0zControlTerminal()</a>--Control a Generic
|
|
Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="endtrml.htm">Qp0zEndTerminal()</a>--End a Generic Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="gettrmlp.htm">Qp0zGetTerminalPid()</a>--Get Process ID for a Generic
|
|
Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="isatrml.htm">Qp0zIsATerminal()</a>--Determine Whether Descriptor Is
|
|
Connected to a Generic Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="settrmlm.htm">Qp0zSetTerminalMode()</a>--Set Modes for a Generic
|
|
Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li><a href="startrml.htm">Qp0zStartTerminal()</a>--Start a Generic
|
|
Terminal<br>
|
|
<br>
|
|
</li>
|
|
|
|
<li>Using the Generic Terminal APIs (see <a href="../apiref/apiexmp.htm">
|
|
Examples</a>)</li>
|
|
</ul>
|
|
<br>
|
|
<hr>
|
|
API introduced: V4R3
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center">
|
|
<a href="#Top_Of_Page">Top</a> |
|
|
<a href="unix.htm">UNIX-Type APIs</a> |
|
|
<a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|
|
|