432 lines
11 KiB
HTML
432 lines
11 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>Convert Seconds to Character Timestamp (CEEDATM) 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>Convert Seconds to Character Timestamp (CEEDATM) API</h2>
|
||
|
|
||
|
<div class="box" style="width: 60%;">
|
||
|
<br>
|
||
|
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="40%">input_seconds</td>
|
||
|
<td align="LEFT" valign="TOP" width="25%">Input</td>
|
||
|
<td align="LEFT" valign="TOP" width="25%">FLOAT8</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="TOP">2</td>
|
||
|
<td align="LEFT" valign="TOP">picture_string</td>
|
||
|
<td align="LEFT" valign="TOP">Input</td>
|
||
|
<td align="LEFT" valign="TOP">VSTRING</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="TOP">3</td>
|
||
|
<td align="LEFT" valign="TOP">output_timestamp</td>
|
||
|
<td align="LEFT" valign="TOP">Output</td>
|
||
|
<td align="LEFT" valign="TOP">VSTRING</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
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="40%">fc</td>
|
||
|
<td align="LEFT" valign="TOP" width="25%">Output</td>
|
||
|
<td align="LEFT" valign="TOP" width="25%">FEEDBACK</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
Service Program Name: QLEAWI<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The Convert Seconds to Character Timestamp (CEEDATM) API formats a number
|
||
|
representing the number of seconds since 00:00:00 14 October 1582. The output
|
||
|
is a character string such as 1988/07/26 20:37:00.</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>input_seconds (input)</strong></dt>
|
||
|
|
||
|
<dd>A 64-bit double floating-point number representing 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,401 (24*60*60 + 01). The valid range is 86 400 to
|
||
|
265 621 679 999.999 (23:59:59.999 31 December 9999).<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>picture_string (input by descriptor)</strong></dt>
|
||
|
|
||
|
<dd>A character string representing the desired format of
|
||
|
<em>output_timestamp</em>, for example <samp>MM/DD/YY HH:MM AP</samp>. Each
|
||
|
character in <em>picture_string</em> represents a character in
|
||
|
<em>output_timestamp</em>. If delimiters such as the slash (<samp>/</samp>)
|
||
|
appear in the picture string, they are copied as is to
|
||
|
<em>output_char_date</em>.
|
||
|
|
||
|
<p><a href="CEEDAYS.htm#TBLPICHAR">Picture Characters Used in Picture
|
||
|
Strings</a> contains a list of valid picture characters, and <a href=
|
||
|
"CEEDAYS.htm#TBLPICXMP">Examples of Picture Strings Recognized by ILE Date and
|
||
|
Time APIs</a> has examples of valid picture strings.</p>
|
||
|
|
||
|
<p>If <em>picture_string</em> is null or blank, CEEDATM obtains
|
||
|
<em>picture_string</em> based on the current job value for the country or
|
||
|
region ID (CNTRYID). For example, if the current job value for CNTRYID
|
||
|
is US (United States), the date-time format is <samp>MM/DD/YYYY HH:MI AP</samp>.
|
||
|
If the current job value for CNTRYID is FR (France), the date-time format is
|
||
|
<samp>YYYY-MM-DD HH.MI</samp>.</p>
|
||
|
|
||
|
<p>This default mechanism makes it easy for translators to specify the
|
||
|
preferred timestamp format, and also easy for application programs and library
|
||
|
procedures to automatically use this format.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>output_timestamp (output by descriptor)</strong></dt>
|
||
|
|
||
|
<dd>A character string that is the result of converting <em>input_seconds</em>
|
||
|
to the format specified by <em>picture_string</em>. If necessary, output is
|
||
|
truncated to the length of <em>output_timestamp</em>. <a href=
|
||
|
"#TBLDTMXMP">Sample Output of the CEEDATM API</a> shows sample output. If
|
||
|
input_seconds is not valid, <em>output_timestamp</em> is set to all blanks and
|
||
|
CEEDATM ends with a nonzero <em>feedback-code</em>.</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"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE0501</td>
|
||
|
<td align="LEFT" valign="TOP">The operational descriptor data type is not
|
||
|
valid</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">CEE0502</td>
|
||
|
<td align="LEFT" valign="TOP">Missing operational descriptor</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2505</td>
|
||
|
<td align="LEFT" valign="TOP">The value for seconds is out of range</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2506</td>
|
||
|
<td align="LEFT" valign="TOP">The value for seconds is outside of era</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2518</td>
|
||
|
<td align="LEFT" valign="TOP">The picture string specification is not
|
||
|
valid</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2527</td>
|
||
|
<td align="LEFT" valign="TOP">Timestamp truncated</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE9902</td>
|
||
|
<td align="LEFT" valign="TOP">Unexpected user error occurred in &1</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<h3>Usage Notes</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>The inverse of CEEDATM is CEESECS. The CEESECS converts timestamp values to
|
||
|
number-of-seconds values.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<p>If the input value is a Lilian date instead of seconds, multiply the Lilian
|
||
|
date by 86 400 (number of seconds in a day), and pass the new value to
|
||
|
CEEDATM.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<p>If <em>picture_string</em> includes the Japanese era symbol
|
||
|
<samp><JJJJ></samp>, the <samp>YY</samp> position in
|
||
|
<em>output_timestamp</em> is replaced by the year within Japanese era. <a href=
|
||
|
"CEEDAYS.htm#TBLPICXMP">Examples of Picture Strings Recognized by ILE Date and
|
||
|
Time APIs</a> has an example. <a href="CEEDAYS.htm#TBLERANAME">Japanese Eras
|
||
|
Used by ILE Date and Time APIs When <JJJJ> Specified</a> contains a list
|
||
|
of Japanese eras supported by CEEDATM.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<p>If <em>picture_string</em> includes the Republic of China (ROC) era symbol
|
||
|
<samp><CCCC></samp> or <samp><CCCCCCCC></samp>, the <samp>YY</samp>
|
||
|
position in <em>output_timestamp</em> is replaced by the year within ROC era.
|
||
|
See <a href="CEEDAYS.htm#TBLPICXMP">Examples of Picture Strings Recognized by
|
||
|
ILE Date and Time APIs</a> for an example. See <a href=
|
||
|
"CEEDAYS.htm#TBLROCERA">Republic of China Eras Used by ILE Date and Time APIs
|
||
|
When <CCCC> or <CCCCCCCC> Specified</a> for a list of ROC eras
|
||
|
supported by CEEDATM.</p>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<p><strong><a name="TBLDTMXMP">Sample Output of the CEEDATM
|
||
|
API</a></strong></p>
|
||
|
|
||
|
<table border cellpadding="3">
|
||
|
<tr>
|
||
|
<th align="LEFT" valign="TOP">input_seconds</th>
|
||
|
<th align="LEFT" valign="TOP">picture_string</th>
|
||
|
<th align="LEFT" valign="TOP">output_timestamp</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">12 799 191 601.000</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>YYMMDD</samp>
|
||
|
<samp>HH:MI:SS</samp>
|
||
|
<samp>YY-MM-DD</samp>
|
||
|
<samp>YYMMDDHHMISS</samp>
|
||
|
<samp>YY-MM-DD HH:MI:SS</samp>
|
||
|
<samp>YYYY-MM-DD HH:MI:SS AP</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
880516
|
||
|
19:00:01
|
||
|
88-05-16
|
||
|
880516190001
|
||
|
88-05-16 19:00:01
|
||
|
1988-05-16 07:00:01 PM
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">12 799 191 661.986</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>DD Mmm YY</samp>
|
||
|
<samp>DD MMM YY HH:MM</samp>
|
||
|
<samp>WWW, MMM DD, YYYY ZH:MI AP</samp>
|
||
|
<samp>Wwwwwwwwwz, ZM/ZD/YY HH:MI:SS.99</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
16 May 88
|
||
|
16 MAY 88 19:01
|
||
|
MON, MAY 16, 1988 7:01 PM
|
||
|
Monday, 5/16/88 19:01:01.98
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">12 799 191 662.009</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>YYYY</samp>
|
||
|
<samp>YY</samp>
|
||
|
<samp>Y</samp>
|
||
|
<samp>MM</samp>
|
||
|
<samp>ZM</samp>
|
||
|
<samp>RRRR</samp>
|
||
|
<samp>MMM</samp>
|
||
|
<samp>Mmm</samp>
|
||
|
<samp>Mmmmmmmmmm</samp>
|
||
|
<samp>Mmmmmmmmmz</samp>
|
||
|
<samp>DD</samp>
|
||
|
<samp>ZD</samp>
|
||
|
<samp>DDD</samp>
|
||
|
<samp>HH</samp>
|
||
|
<samp>ZH</samp>
|
||
|
<samp>MI</samp>
|
||
|
<samp>SS</samp>
|
||
|
<samp>99</samp>
|
||
|
<samp>999</samp>
|
||
|
<samp>AP</samp>
|
||
|
<samp>WWW</samp>
|
||
|
<samp>Www</samp>
|
||
|
<samp>Wwwwwwwwww</samp>
|
||
|
<samp>Wwwwwwwwwz</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>1988</samp>
|
||
|
<samp>88</samp>
|
||
|
<samp>8</samp>
|
||
|
<samp>05</samp>
|
||
|
<samp>5</samp>
|
||
|
<samp>V </samp>
|
||
|
<samp>MAY</samp>
|
||
|
<samp>May</samp>
|
||
|
<samp>May </samp>
|
||
|
<samp>May</samp>
|
||
|
<samp>16</samp>
|
||
|
<samp>16</samp>
|
||
|
<samp>137</samp>
|
||
|
<samp>19</samp>
|
||
|
<samp>19</samp>
|
||
|
<samp>01</samp>
|
||
|
<samp>02</samp>
|
||
|
<samp>00</samp>
|
||
|
<samp>009</samp>
|
||
|
<samp>PM</samp>
|
||
|
<samp>MON</samp>
|
||
|
<samp>Mon</samp>
|
||
|
<samp>Monday </samp>
|
||
|
<samp>Monday</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<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>Convert number of seconds to <samp>YYYY/MM/DD HH.MM.SS</samp> format:</p>
|
||
|
|
||
|
<pre>
|
||
|
CALL CEEDATM (secs, 'YYYY/MM/DD HH.MI.SS', timestmp,
|
||
|
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>
|
||
|
|