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

460 lines
14 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>Read from Virtual Terminal (QTVRDVT) 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 August 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>Read from Virtual Terminal (QTVRDVT) 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">Read information</td>
<td align="left" valign="top">Output</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">Output</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Number of bytes to read</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">Data received</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">6</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 Read from Virtual Terminal (QTVRDVT) API reads data from the virtual
terminal into the server program's data buffer. Your application should read
data only if it has received an asynchronous notification message on the data
queue, or if the more data flag was set on a previous read operation. The data
received is in 5250 data stream format.</p>
<p>Only one full-screen display of data can be received at a time. If the data
buffer is too small, partial displays are received and the more data flag for
the QTVRDVT API's read information parameter is set to 1.</p>
<p>Before working with 5250 data streams, be sure to see the <cite>
IBM 5494 Functions Reference</cite> book, SC30-3533. This book can be viewed online
through the
<a href="http://www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi?CTY=US" target="_blank">IBM
Publications Center</a><img src="www.gif" alt="Link outside Information Center">.</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 by the
operating system with the Open Virtual Terminal Path (QTVOPNVT) API.</p>
</dd>
<dt><strong>Read information</strong></dt>
<dd>OUTPUT; CHAR(10)
<p>Information about the read operation. The characters and their meanings
are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top" width="5%"><em>1</em></td>
<td align="left" valign="top" width="95%">The operation code, which gives the
server program additional information about i5/OS status and what is expected
of the server program. Valid values for this parameter are:
<table cellpadding="5">
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Invite</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>5</em></td>
<td align="left" valign="top">Restore display</td>
</tr>
<tr>
<td align="left" valign="top"><em>6</em></td>
<td align="left" valign="top">Read immediate</td>
</tr>
<tr>
<td align="left" valign="top"><em>8</em></td>
<td align="left" valign="top">Read display</td>
</tr>
<tr>
<td align="left" valign="top"><em>A</em></td>
<td align="left" valign="top">Cancel invite</td>
</tr>
<tr>
<td align="left" valign="top"><em>B</em></td>
<td align="left" valign="top">Turn on message light</td>
</tr>
<tr>
<td align="left" valign="top"><em>C</em></td>
<td align="left" valign="top">Turn off message light</td>
</tr>
</table>
<p>For detailed descriptions of these codes, see <a href="#HDROPCD">Read Operation Codes</a>.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">More data flag. Valid values for this parameter
are:
<table cellpadding="5">
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">There is no more data.</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">More data is available. Issue the read operation
again to receive the additional data. This flag is set if the buffer specified
on input is not large enough to hold all of the data received from the virtual
terminal.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">Key flag. Valid character values for this
parameter 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.</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>OUTPUT; CHAR(*)
<p>The server program's buffer for receiving data from the virtual terminal.
The data is a 5250 data stream.</p>
<p>The QTVRDVT API does not lock the data buffer. Thus, other applications
should not use the buffer while the API is using it.</p>
<p>The data buffer should be large enough to hold the largest display of data
expected. If it is not large enough for all the data to fit, the more data flag
of the read information parameter is set to 1. Additional read requests must be
performed, until all the remaining data is received and the more data flag is
set back to 0.</p>
</dd>
<dt><strong>Number of bytes to read</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of bytes to read from the data buffer. This number must be
smaller than or equal to the size of the data buffer.</p>
</dd>
<dt><strong>Data received</strong></dt>
<dd>OUTPUT; BINARY(4)
<p>The amount of data received from the virtual terminal in bytes. If no data
is received from the virtual terminal, 0 is returned. Some read operations do
not return any data.</p>
<p>For graphic work stations, a maximum of 24&nbsp;576 (24KB) bytes of data can
be returned.</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="HDROPCD">Read Operation Codes</a></h3>
<p>The following table describes the operation codes that can be returned on a
read request.<br>
</p>
<table border width="80%">
<tr>
<th align="left" colspan="3"><em>Read Operation Codes</em></th>
</tr>
<tr>
<th align="center" valign="bottom">Value</th>
<th align="left" valign="bottom">Response Name</th>
<th align="left" valign="bottom">Description</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="20%">Invite</td>
<td align="left" valign="top" width="70%">The operating system and the
application are ready to receive data. The server program is expected to follow
this with a write operation when data becomes available from the client
program.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Output only</td>
<td align="left" valign="top">This read request returned some data. The server
program should send the data to the client program. However, the operating
system is not ready to receive data from the server program. The server program
should not request any data from the client program yet. This response usually
occurs because an application is performing several put operations to the
virtual terminal device. After the last put operation by the application, a
put/get operation code is usually returned on the read operation.</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Put/get</td>
<td align="left" valign="top">Data is returned from this read request and
should be sent by the server program to the client program. The operating
system is ready to receive data from the server program. The server program
should wait for data from the client program.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Save display</td>
<td align="left" valign="top">The operating system expects the server program
to obtain the data from the current display and write the data to the virtual
terminal. The operating system saves the display for later use, such as
returning the display to the server program. The server program must indicate a
save-display response on the write operation and send the saved display as data
(that is, the saved display must be in the data buffer).</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Restore display</td>
<td align="left" valign="top">The data returned is a previously saved display.
The server program should send the data to the client program.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Read immediate</td>
<td align="left" valign="top">No data is returned from this read request. The
operating system expects the server program to write data to the virtual
terminal. Only data from input fields should be written.</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="left" valign="top">Read display</td>
<td align="left" valign="top">No data is returned from this read request. The
operating system expects the server program to write data to the virtual
terminal. The current display should be written.</td>
</tr>
<tr>
<td align="center" valign="top">A</td>
<td align="left" valign="top">Cancel invite</td>
<td align="left" valign="top">No data is returned from this read request. The
operating system expects the server program to signal the client program to
cancel the outstanding invite operation. When it is canceled, the server
program must perform a write operation to the virtual terminal and indicate a
cancel invite response. Because the response has no data associated with it,
the number of bytes to write must be set to 0 for the write operation.</td>
</tr>
<tr>
<td align="center" valign="top">B</td>
<td align="left" valign="top">Turn on message light</td>
<td align="left" valign="top">No data is returned from this read request. A
message has been received, and the user should be notified. The server program
should signal the client program to turn on a display message indicator light
or some other indicator.</td>
</tr>
<tr>
<td align="center" valign="top">C</td>
<td align="left" valign="top">Turn off message light</td>
<td align="left" valign="top">No data is returned from this read request. The
display message light or some other indicator should be set off.</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">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">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>