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

230 lines
6.6 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>Get Current Local Time (CEELOCT) 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 -->
<!-- ILE4A SCRIPT A converted by B2H R4.1 (346) (CMS) by NLJONES at -->
<!-- RCHVMX on 25 Feb 1999 at 10:53:17 -->
<!--Edited by Kersten Oct 2001 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>Get Current Local Time (CEELOCT) API</h2>
<div class="box" style="width: 65%;">
<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%">output_Lilian</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">INT4</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">output_seconds</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">FLOAT8</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">output_Gregorian</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">CHAR23</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Omissible Parameter:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">4</td>
<td align="left" valign="top" width="50%">fc</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">FEEDBACK</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Service Program Name: QLEAWI<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Get Current Local Time (CEELOCT) API returns the current local time in
three formats: Lilian date (the number of days since 14 October 1582), Lilian
timestamp (the number of seconds since 00:00:00 14 October 1582), and Gregorian
character string (in the form YYYYMMDDHHMISS999'). These values are compatible
with the other ILE date and time APIs and with existing language intrinsic
functions. CEELOCT performs the same service, faster, than calling CEEUTC,
CEEUTCO, and CEEDATM in succession.</p>
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
<!-- Instead, use the commented out coding below to indicate NONE. -->
<h3>Authorities and Locks</h3>
<!-- Use this if there are no authorities and locks. -->
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>output_Lilian (output)</strong></dt>
<dd>A 32-bit binary integer representing the current <em>local</em> date in the
Lilian format. That is, day 1 is 15 October 1582, day 148&nbsp;887 is 4 June
1990. If local time is not available from the system, <em>output_Lilian</em> is
set to 0 and CEELOCT ends with a nonzero feedback code.<br>
<br>
</dd>
<dt><strong>output_seconds (output)</strong></dt>
<dd>A 64-bit double floating point number representing the current <em>
local</em> date and time as the number of seconds since 00:00:00 on 14 October
1582. For example, 00:00:01 on 15 October 1582 is second number 86&nbsp;401
(24*60*60 + 01). 19:00:01.078 on 4 June 1990 is second number
12&nbsp;863&nbsp;905&nbsp;201.078. If local time is not available from the
system, <em>output_seconds</em> is set to 0 and CEELOCT ends with a nonzero
feedback code.<br>
<br>
</dd>
<dt><strong>output_Gregorian (output)</strong></dt>
<dd>A 23-byte character field, where the leading 17 bytes contain a string in the form YYYYMMDDHHMISS999
representing local year, month, day, hour, minute, second, and millisecond.
The remaining 6 bytes are reserved and are currently set to the value 0.
<br>
<br>
</dd>
</dl>
<br>
<h3>Omissible Parameter</h3>
<dl>
<dt><strong>fc (output)</strong></dt>
<dd>A 12-byte feedback code passed by reference. If specified as an argument,
feedback information (a condition token) is returned to the calling procedure.
If not specified and the requested operation was not successfully completed,
the condition is signaled to the condition manager.</dd>
</dl>
<br>
<h3>Feedback Codes and Conditions</h3>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top">CEE0000</td>
<td align="left" valign="top">The API completed successfully</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 00</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE2502</td>
<td align="left" valign="top">Local time not available</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 30</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
</table>
<br>
<h3>Usage Notes</h3>
<ul>
<li>
<p>Use CEEUTC to determine Universal Time Coordinated (UTC).</p>
</li>
<li>
<p>Use CEEUTCO to obtain the offset from UTC to local time.</p>
</li>
<li>
<p>The character value returned by CEELOCT is designed to match that produced
by existing language intrinsic functions. The numeric values returned can be
used to simplify date calculations.</p>
</li>
<li>
<p>If the format of <em>output_Gregorian</em> is inappropriate, CEEDATM can be
used to convert <em>output_seconds</em> to any required format.</p>
</li>
</ul>
<br>
<h3>Example</h3>
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
for information pertaining to code examples.</p>
<ul>
<li>
<p>Extract current local date and time in the form <samp>
YYYYMMDDHHMISS999</samp>:</p>
<pre>
CALL CEELOCT (days, secs, localdatetime, fc);
</pre>
</li>
</ul>
<br>
<hr>
API introduced: V2R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"ile1a1.htm">ILE CEE APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>