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

394 lines
10 KiB
HTML
Raw Permalink 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>Write to Virtual Terminal (QTVWRTVT) 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. -->
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- File cleanup completed Sept 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 type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>Write to Virtual Terminal (QTVWRTVT) API</h2>
<div class="box" style="width: 70%;">
<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%">Virtual terminal handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(16)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Write information</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Data buffer</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Input</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Number of bytes to write</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</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;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Write to Virtual Terminal (QTVWRTVT) API writes data from a server
program's data buffer to a virtual terminal. You can send one display to the
virtual terminal during each write operation. You cannot send partial or
multiple displays.</p>
<br>
<h3>Authorities and Locks</h3>
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Virtual terminal handle</strong></dt>
<dd>INPUT; CHAR(16)
<p>The reference code for the open virtual terminal path, created with the Open
Virtual Terminal Path (QTVOPNVT) API.</p>
</dd>
<dt><strong>Write information</strong></dt>
<dd>INPUT; CHAR(10)
<p>Information about the write operation. The information given in each
character is as follows:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Key flag. Valid values are:
<table cellpadding="5">
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">The Enter key was pressed.</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">The System Request key was pressed. The next read
operation returns the iSeries System Request menu.</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">The Attention key was pressed. In this case, the
number of bytes to write must be 0.</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">The Test Request key was pressed.</td>
</tr>
<tr>
<td align="left" valign="top"><em>4</em></td>
<td align="left" valign="top">The Help-in-Error key was pressed.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">Operation code. This parameter describes the type
of write operation to perform. Valid values and their meanings are:
<table cellpadding="5">
<tr>
<td align="left" valign="top"><em>blank</em></td>
<td align="left" valign="top">Put/get</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">Output only</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">Put/get</td>
</tr>
<tr>
<td align="left" valign="top"><em>4</em></td>
<td align="left" valign="top">Save display</td>
</tr>
<tr>
<td align="left" valign="top"><em>A</em></td>
<td align="left" valign="top">Cancel invite</td>
</tr>
</table>
<p>For detailed descriptions of these codes, see
<a href="#HDRWOPCD">Write Operation Codes</a>.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">Data stream output error. The negative response
code, for example X'10030101', is sent as data in the data buffer.
<table cellpadding="5">
<tr>
<td align="left" valign="top"><em>blank</em></td>
<td align="left" valign="top">5250 data in data buffer</td>
</tr>
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">5250 data in data buffer</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Data stream error; SNA response code data is in
the data buffer.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>4-10</em></td>
<td align="left" valign="top">Reserved. These characters must be blank.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Data buffer</strong></dt>
<dd>INPUT; CHAR(*)
<p>The server program's buffer containing the data to send to the virtual
terminal.</p>
<p>The QTVWRTVT API does not lock the data buffer. Thus, other applications
should not use the buffer while the API is using it.</p>
</dd>
<dt><strong>Number of bytes to write</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of bytes to write. This number must be smaller than or equal to
the size of the data buffer. Valid range of numbers is 0 through 24KB. This
parameter must be 0 if character 1 of the write information parameter is 2.</p>
<p>Some write operations do not write data.</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><a name="HDRWOPCD">Write Operation Codes</a></h3>
<p>The following table describes the operation codes that can be used for the
write information parameter.</p>
<table border width="80%">
<tr>
<th align="left" colspan="3"><em>Write Operation Codes</em></th>
</tr>
<tr>
<th align="center" valign="bottom">Value</th>
<th align="left" valign="bottom">Name</th>
<th align="left" valign="bottom">Description</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">blank</td>
<td align="left" valign="top" width="15%">Put/get</td>
<td align="left" valign="top" width="75%">Data is being sent to the virtual
terminal. The virtual terminal server program is ready for input.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Output only</td>
<td align="left" valign="top">This write operation is in response to a read
request that returned an output-only read operation code.</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Put/get</td>
<td align="left" valign="top">See the description above.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Save display</td>
<td align="left" valign="top">This write operation is in response to a read
request that returned a save display read operation code. No data is associated
with this write operation; thus, the data buffer length must be set to 0.</td>
</tr>
<tr>
<td align="center" valign="top">A</td>
<td align="left" valign="top">Cancel invite</td>
<td align="left" valign="top">This write operation is in response to a read
request that returned a cancel invite read operation code. No data is
associated with this write operation; thus, the data buffer length must be set
to 0.</td>
</tr>
</table>
<br>
<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%">CPF3C90 E</td>
<td align="left" valign="top" width="85%">Literal value cannot be changed.</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">CPF87D4 E</td>
<td align="left" valign="top">Data sent exceeded the corresponding I/O
request.</td>
</tr>
<tr>
<td align="left" valign="top">CPF87F2 E</td>
<td align="left" valign="top">Virtual terminal handle &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF87F3 E</td>
<td align="left" valign="top">Data buffer length &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF87F4 E</td>
<td align="left" valign="top">Key flag &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF87F5 E</td>
<td align="left" valign="top">Operation code response &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF87F7 E</td>
<td align="left" valign="top">Parameter value &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF87F8 E</td>
<td align="left" valign="top">Unexpected internal system error occurred in
program &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="vt1a.htm">Virtual Terminal APIs</a> |
<a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>