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

470 lines
13 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>Retrieve Time (QWCRTVTM) 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. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--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>Retrieve System Time Information (QWCRTVTM) API</h2>
<div class="box" style="width: 80%;">
<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%">Receiver variable</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of receiver variable</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Format name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Number of fields to return</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">Key of fields to return</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Array(*) of 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: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>
The Retrieve System Time Information (QWCRTVTM) API retrieves the current Coordinated Universal Time and time adjustment information.
</p>
<br>
<h3>Authorities and Locks</h3>
<p>None</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Receiver variable</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>
The variable that is used to return the time information.
</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>
The length of the receiver variable. This must be a minimum of 8 bytes.
</p>
</dd>
<dt><strong>Format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>
The format of the information to be returned in the receiver variable. The possible format name is:
</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>RTTM0100</em></td>
<td align="left" valign="top">Basic time information. See <a href="#HDRRECVAR">Format of Receiver Variable</a> for more information.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Number of fields to return</strong></dt>
<dd>INPUT; BINARY(4)
<p>
The number of fields to return in the specified format.
</p>
</dd>
<dt><strong>Key of fields to return</strong></dt>
<dd>INPUT; ARRAY(*) of BINARY(4)
<p>
The list of fields to be returned in the specified format. For a list of
valid fields, see <a href="#HDRVKEYS"> Valid Keys</a>.</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="HDRRECVAR">Format of Receiver Variable</a></h3>
<p>
The following table describes the order and format of the data that is returned in the receiver variable.
For detailed descriptions of the fields in this table, see <a href="#FLDDESC1">Field Descriptions</a>.
</p>
<h3>RTTM0100</h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Bytes returned</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Bytes available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to key fields</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of fields returned</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="left" valign="top" rowspan="7" colspan="2">These fields repeat, in
the order listed, for the number of key fields returned.</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of field information returned</td>
</tr>
<tr>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Key field</td>
</tr>
<tr>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Type of data</td>
</tr>
<tr>
<td align="left" valign="top">CHAR(3)</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of data</td>
</tr>
<tr>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Data</td>
</tr>
<tr>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Reserved</td>
</tr>
</table>
<br>
<h3><a name="FLDDESC1">Field Descriptions</a></h3>
<p><strong>Bytes available.</strong> The number of bytes of data available to
be returned. All available data is returned if enough space is provided.</p>
<p><strong>Bytes returned.</strong> The number of bytes of data returned.</p>
<p><strong>Data.</strong> The data returned for the key field.</p>
<p><strong>Key field.</strong> The field returned. See <a href="#HDRVKEYS">
Valid Keys</a> for the list of valid keys.</p>
<p><strong>Length of data.</strong> The length of the data returned for the
field.</p>
<p><strong>Length of field information returned.</strong> The total length of
information returned for this field. This value is used to increment to the
next field in the list.</p>
<p><strong>Number of fields returned.</strong> The number of fields returned to
the application.</p>
<p><strong>Offset to key fields.</strong> The offset in bytes from
the beginning of the receiver to the key fields array entry.</p>
<p><strong>Reserved.</strong> An unused field.</p>
<p><strong>Type of data.</strong> The type of data returned.</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>C</em></td>
<td align="left" valign="top">The data is returned in character format.</td>
</tr>
<tr>
<td align="left" valign="top"><em>B</em></td>
<td align="left" valign="top">The data is returned in binary format.</td>
</tr>
</table>
<br>
<h3><a name="HDRVKEYS">Valid Keys</a></h3>
<p>
The following indicates the valid keys for the formats specified.
See <a href="#HDRVKEYF"> Key Field Descriptions</a> for the descriptions of
the valid key attributes.
</p>
<table border width="80%">
<tr>
<th align="left" valign="top">Key</th>
<th align="left" valign="top">Type</th>
<th align="left" valign="top">Description</th>
</tr>
<tr>
<td align="left" valign="top" width="10%">0101
<td align="left" valign="top" width="30%">CHAR(8)</td>
<td align="left" valign="top" width="60%">Coordinated Universal Time</td>
</tr>
<tr>
<td align="left" valign="top">0201
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Time adjustment status</td>
</tr>
<tr>
<td align="left" valign="top">0202</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Time adjustment direction</td>
</tr>
<tr>
<td align="left" valign="top">0203</td>
<td align="left" valign="top">BINARY(8), UNSIGNED</td>
<td align="left" valign="top">Time adjustment amount</td>
</tr>
<tr>
<td align="left" valign="top">0204</td>
<td align="left" valign="top">BINARY(8), UNSIGNED</td>
<td align="left" valign="top">Time adjustment duration</td>
</tr>
<tr>
<td align="left" valign="top">0205</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Time adjustment supported</td>
</tr>
</table>
<br>
<h3><a name="HDRVKEYF">Key Field Descriptions</a></h3>
<p><strong>Coordinated Universal Time.</strong> The value of the time-of-day clock which is returned as the Coordinated Universal Time (UTC) for the system. The UTC is returned as a system time-stamp.</p>
<p><strong>Time adjustment amount.</strong> The time value which specifies the remaining amount of time, in microseconds, by which the time-of-day clock will be increased or decreased. If a time adjustment is not active, this field will be hex zeros.</p>
<p><strong>Time adjustment direction.</strong> The direction of the time-of-day clock adjustment for the system. If a time adjustment is not active, this field will be blank.</p>
<dl compact>
<dt><em>0</em></dt>
<dd>Increase time of day.</dd>
<dt><em>1</em>
<dd>Decrease time of day.</dd>
</dl>
<p><strong>Time adjustment duration.</strong> The time value which provides an estimate of the amount of time, in microseconds, required in order to complete the time-of-day clock adjustment. If a time adjustment is not active, this field will be hex zeros.</p>
<p><strong>Time adjustment status.</strong> The status of the time-of-day clock adjustment.</p>
<dl compact>
<dt><em>0</em></dt>
<dd>Time-of-day clock adjustment not active.</dd>
<dt><em>1</em>
<dd>Time-of-day clock adjustment active.</dd>
</dl>
<p>
<strong>Time adjustment supported.</strong> The availability of the time-of-day clock adjustments for the system.</p>
<dl compact>
<dt><em>0</em></dt>
<dd>Time adjustments not supported.</dd>
<dt><em>1</em>
<dd>Time adjustments supported.</dd>
</dl>
<br>
<h3><a name="header_9">Error Messages</a></h3>
<p>The following messages may be sent from this function:</p>
<table width="100%">
<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">CPF1866 E</td>
<td align="left" valign="top">Value &amp;1 for number of fields to return not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1867 E</td>
<td align="left" valign="top">Value &amp;1 in list not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td align="left" valign="top">Severe error while addressing parameter
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C21 E</td>
<td align="left" valign="top">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C24 E</td>
<td align="left" valign="top">Length of the receiver variable is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C36 E</td>
<td align="left" valign="top">Number of parameters, &amp;1, entered for
this API was not valid.</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">CPF3CF2 E</td>
<td align="left" valign="top">Error(s) occurred during running of &amp;1
API.</td>
</tr>
<tr>
<td valign="top">CPF9821 E</td>
<td valign="top">Not authorized to program &amp;1 in library &amp;2.</td>
</tr>
<tr>
<td valign="top">CPF9872 E</td>
<td valign="top">Program or service program &amp;1 in library &amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<br>
<hr>
API introduced: V5R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"catdate.htm">Date and Time APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
</body>
</html>