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

282 lines
6.7 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>Set System Time (QWCSETTM) 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>Set System Time (QWCSETTM) 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">1</td>
<td align="left" valign="top">Input format</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top" width="10%">2</td>
<td align="left" valign="top" width="50%">Input variable</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">3</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 Set System Time (QWCSETTM) API sets the Coordinated Universal Time (UTC) for the system.
</p>
<p>
For additional information on setting the time, see <a href="#HDRUSAGE">Usage Notes</a>.
</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>User Special Authority</em></dt>
<dd>*ALLOBJ</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Input format</strong></dt>
<dd>INPUT; CHAR(8)
<p>
The format of the date specified for the input variable. Valid values are:
</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*YYMD</em></td>
<td align="left" valign="top">YYYYMMDD (4-digit year, month, day) format.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*MDYY</em></td>
<td align="left" valign="top">MMDDYYYY (month, day, 4-digit year) format.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*DMYY</em></td>
<td align="left" valign="top">DDMMYYYY (day, month, 4-digit year) format.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Input variable</strong></dt>
<dd>INPUT; CHAR(*)
<p>
The date as Coordinated Universal Time (UTC) that is used to set the time-of-day clock.
See <a href="#HDRINFMT">Input Variable Formats</a>
to determine the structure of the input variable.
</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="HDRINFMT">Input Variable Formats</a></h3>
<p>This table shows the formats used for the input variable parameter.</p>
<table border width="80%">
<tr>
<th align="left" valign="top">Input Format</th>
<th align="left" valign="top">Input Variable</th>
</tr>
<tr>
<td align="left" valign="top">*YYMD, *MDYY, *DMYY in microseconds</td>
<td align="left" valign="top">The first 20 characters are used. See <a href=
"#HDRVALSTR20">20-Byte Character Date and Time Value Structure</a>.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRVALSTR20">20-Byte Character Date and Time Value
Structure</a></h3>
<p>
This table shows the structure used for the input variable when
the format is *YYMD, *MDYY, and *DMYY.
</p>
<table border width="80%">
<tr>
<th align="left" valign="top">Offset</th>
<th align="left" valign="top">Description</th>
</tr>
<tr>
<td align="left" valign="top" width="15%">0-7</td>
<td align="left" valign="top" width="85%">Date, left-justified. This value
cannot be all blanks or all zeros.</td>
</tr>
<tr>
<td align="left" valign="top">8-13</td>
<td align="left" valign="top">Time, in HHMMSS (hours, minutes, seconds)
format.</td>
</tr>
<tr>
<td align="left" valign="top">14-19</td>
<td align="left" valign="top">Microseconds. This value cannot be blanks.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRUSAGE">Usage Notes</a></h3>
<p>
The supported date range is from August 23, 1928, 12:03:06.314752 to May 10, 2071, 11:56:53.685240.
Setting an input date that is outside this range will result in a date within this range.
If you specify a precision of microseconds, it is recommended that you use a
microsecond value that is evenly divisible by 8.
</p>
<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">CPF1060 E</td>
<td align="left" valign="top">Date not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1061 E</td>
<td align="left" valign="top">Time not valid.</td>
</tr>
<tr>
<td width="15%" valign="top">CPF1890 E</td>
<td width="85%" valign="top">*ALLOBJ authority required for requested operation.</td>
</tr>
<tr>
<td width="15%" valign="top">CPF24B4 E</td>
<td width="85%" valign="top">Severe error while addressing parameter list.</td>
</tr>
<tr>
<td valign="top">CPF3C21 E</td>
<td valign="top">Format name &amp;1 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 valign="top">CPF3CF1 E</td>
<td valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td valign="top">CPF3CF2 E</td>
<td valign="top">Error(s) occurred during running of &amp;1 API.</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>