912 lines
22 KiB
HTML
912 lines
22 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 Date to Lilian Format (CEEDAYS) 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 Date to Lilian Format (CEEDAYS) API</h2>
|
||
|
<div class="box" style="width: 65%;">
|
||
|
<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_char_date</td>
|
||
|
<td align="LEFT" valign="TOP" width="25%">Input</td>
|
||
|
<td align="LEFT" valign="TOP" width="25%">VSTRING</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_Lilian_date</td>
|
||
|
<td align="LEFT" valign="TOP">Output</td>
|
||
|
<td align="LEFT" valign="TOP">INT4</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 Date to Lilian Format (CEEDAYS) API converts a string
|
||
|
representing a date into a number representing the number of days since 14
|
||
|
October 1582. This API makes it easier to do calculations such as the number of
|
||
|
days between two dates.</p>
|
||
|
|
||
|
<br>
|
||
|
<!-- 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_char_date (input by descriptor)</strong></dt>
|
||
|
|
||
|
<dd>A character string representing a date or timestamp in the format shown by
|
||
|
<em>picture_string</em>. Field width is 5 to 255 characters.
|
||
|
<em>Input-char-date</em> can contain leading or trailing blanks. Parsing for a
|
||
|
date begins with the first non-blank character unless the picture string
|
||
|
contains leading blanks, in which case CEEDAYS skips exactly that many
|
||
|
positions before parsing begins. After a valid date is parsed, remaining
|
||
|
characters are ignored. Valid dates are in the range 15 October 1582 to 31
|
||
|
December 9999.<br>
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>picture_string (input by descriptor)</strong></dt>
|
||
|
|
||
|
<dd>A character string indicating the format of the date value in
|
||
|
<em>input_char_date</em>, for example <samp>MM/DD/YY</samp>. Each character in
|
||
|
<em>picture_string</em> represents a character in <em>input_char_date</em>. If
|
||
|
delimiters such as the slash (<samp>/</samp>) appear in the picture string,
|
||
|
then leading zeros can be omitted. For example:
|
||
|
|
||
|
<pre>
|
||
|
CALL CEEDAYS('6/2/88' , 'MM/DD/YY', lildate, fc);
|
||
|
CALL CEEDAYS('06/02/88', 'MM/DD/YY', lildate, fc);
|
||
|
CALL CEEDAYS('060288' , 'MMDDYY' , lildate, fc);
|
||
|
CALL CEEDAYS('88154' , 'YYDDD' , lildate, fc);
|
||
|
</pre>
|
||
|
|
||
|
would all assign the same value to variable <samp>lildate</samp>. If any time
|
||
|
characters are included, for example <samp>HH:MI:SS YY/MM/DD</samp>, they count
|
||
|
as place holders but are otherwise ignored.
|
||
|
|
||
|
<p><a href="#TBLPICHAR">Picture Characters Used in Picture Strings</a> contains
|
||
|
a list of valid picture characters, and <a href="#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, CEEDAYS obtains <em>picture_string</em>
|
||
|
based on the current job value for the country or region ID (CNTRYID). For
|
||
|
example, if the current value for CNTRYID is US (United States), the date
|
||
|
format is <samp>MM/DD/YY</samp>. If the current job value for CNTRYID is
|
||
|
FR (France), the date format is <samp>DD.MM.YYYY</samp>.</p>
|
||
|
|
||
|
<p>This default mechanism makes it easy for translators to specify the
|
||
|
preferred date format, and also easy for application programs and library
|
||
|
procedures to automatically use this format.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>output_Lilian_date (output)</strong></dt>
|
||
|
|
||
|
<dd>A 32-bit binary integer representing the Lilian date, which is the number
|
||
|
of days since 14 October 1582. For example, 16 May 1988 is day number
|
||
|
148 138. If <em>input_char_date</em> does not contain a valid date,
|
||
|
<em>output_Lilian_date</em> is set to 0 and CEEDAYS ends with a nonzero
|
||
|
feedback code.</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>CEE2507</td>
|
||
|
<td align="LEFT" valign="TOP">Insufficient data provided</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2508</td>
|
||
|
<td align="LEFT" valign="TOP">The value for day is not valid</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2509</td>
|
||
|
<td align="LEFT" valign="TOP">The value for era is not valid</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2513</td>
|
||
|
<td align="LEFT" valign="TOP">The value for Lilian date is not valid</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">Severity: 30</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td>CEE2517</td>
|
||
|
<td align="LEFT" valign="TOP">The value for month is not valid</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>CEE2521</td>
|
||
|
<td align="LEFT" valign="TOP">The value for year is not valid</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 CEEDAYS is CEEDATE. The CEEDATE API converts a date in the
|
||
|
Lilian format to character format.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<p>Date calculations can be performed easily on the
|
||
|
<em>output_Lilian_date</em>, because it is an integer. Leap year and
|
||
|
end-of-year anomalies are avoided.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<p>See <a href="CEESCEN.htm">Set Century (CEESCEN) API</a> and <a href=
|
||
|
"CEEQCEN.htm">Query Century (CEEQCEN) API</a> for information on 2-digit
|
||
|
years.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
<p>If picture_string includes a Japanese era symbol <samp><JJJJ></samp>,
|
||
|
the <samp>YY</samp> position in <em>input_char_date</em> is assumed to contain
|
||
|
the year within Japanese era. <a href="#TBLPICXMP">Examples of Picture Strings
|
||
|
Recognized by ILE Date and Time APIs</a> has an example. <a href=
|
||
|
"#TBLERANAME">Japanese Eras Used by ILE Date and Time APIs When <JJJJ>
|
||
|
Specified</a> contains a list of the Japanese eras recognized by CEEDAYS.</p>
|
||
|
</li>
|
||
|
|
||
|
<li>If <em>picture_string</em> includes a Republic of China (ROC) era symbol
|
||
|
<samp><CCCC></samp> or <samp><CCCCCCCC></samp>, the <samp>YY</samp>
|
||
|
position in <em>input_char_date</em> is assumed to contain the year within ROC
|
||
|
era. <a href="#TBLPICXMP">Examples of Picture Strings Recognized by ILE Date
|
||
|
and Time APIs</a> has an example. <a href="#TBLROCERA">Republic of China Eras
|
||
|
Used by ILE Date and Time APIs When <CCCC> or <CCCCCCCC>
|
||
|
Specified</a> contains a list of the ROC eras recognized by CEEDAYS. The coding
|
||
|
of YYY or ZYY without including one of the era symbols is a picture string
|
||
|
specification error.</li>
|
||
|
</ul>
|
||
|
|
||
|
<br>
|
||
|
<p><strong><a name="TBLPICHAR">Picture Characters Used in Picture
|
||
|
Strings</a></strong></p>
|
||
|
|
||
|
<table border cellpadding="3">
|
||
|
<!-- cols="20 30 27 23" -->
|
||
|
<tr>
|
||
|
<th align="LEFT" valign="TOP">Picture Characters</th>
|
||
|
<th align="LEFT" valign="TOP">Explanation</th>
|
||
|
<th align="LEFT" valign="TOP">Valid Values</th>
|
||
|
<th align="LEFT" valign="TOP">Notes</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>Y</samp>
|
||
|
<samp>YY</samp>
|
||
|
|
||
|
|
||
|
<samp>YYY</samp>
|
||
|
<samp>ZYY</samp>
|
||
|
<samp>YYYY</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
1-digit year
|
||
|
2-digit year
|
||
|
|
||
|
|
||
|
3-digit year
|
||
|
3-digit year within era
|
||
|
4-digit year
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
0-9
|
||
|
00-99
|
||
|
|
||
|
|
||
|
000-999
|
||
|
1-999
|
||
|
1582-9999
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>Y</samp> valid for output only.
|
||
|
<samp>YY</samp> implies the years xx00-xx99. (The years are dependent on the
|
||
|
century start value and the system date.) <samp>YYY or ZYY</samp> used with
|
||
|
<samp><JJJJ></samp>, <samp><CCCC></samp>, and
|
||
|
<samp><CCCCCCCC></samp>.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP"><samp><JJJJ></samp></td>
|
||
|
<td align="LEFT" valign="TOP">Japanese era name in DBCS characters</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<em>Heisei</em>
|
||
|
(<samp>X'0E458D45BA0F'</samp>)
|
||
|
<em>Showa</em>
|
||
|
(<samp>X'0E45B3457A0F'</samp>)
|
||
|
<em>Taisho</em>
|
||
|
(<samp>X'0E455B45770F'</samp>)
|
||
|
<em>Meiji</em>
|
||
|
(<samp>X'0E45A645840F'</samp>)
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">Affects <samp>YY</samp> field: if
|
||
|
<samp><JJJJ></samp> specified, <samp>YY</samp> means the year within
|
||
|
Japanese era. For example, 1988 = Showa 63. See example in <a href=
|
||
|
"#TBLPICXMP">Examples of Picture Strings Recognized by ILE Date and Time
|
||
|
APIs</a>.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp><CCCC></samp>
|
||
|
<samp><CCCCCCCC></samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">Republic of China (ROC) era name in DBCS
|
||
|
characters</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<em>MinKow</em>
|
||
|
(<samp>X'0E4D8256CE0F'</samp>)
|
||
|
<em>ChuHwaMinKow</em>
|
||
|
(<samp>X'0E4C845ADD4D8256CE0F'</samp>)
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">Affects <samp>YY</samp> field: if
|
||
|
<samp><CCCC></samp> specified, <samp>YY</samp> means the year within ROC
|
||
|
era. For example, 1988 = Minkow 77. See example in <a href=
|
||
|
"#TBLPICXMP">Examples of Picture Strings Recognized by ILE Date and Time
|
||
|
APIs</a>.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>MM</samp>
|
||
|
<samp>ZM</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
2-digit month
|
||
|
1- or 2-digit month
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
01-12
|
||
|
1-12
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">For output, leading zero suppressed. For input,
|
||
|
<samp>ZM</samp> treated as <samp>MM</samp>.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>RRRR</samp>
|
||
|
<samp>RRRZ</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">Roman numeral month</td>
|
||
|
<td align="LEFT" valign="TOP">I-XII (Left-justified)</td>
|
||
|
<td align="LEFT" valign="TOP">For input, source string is folded to uppercase.
|
||
|
For output, uppercase only. I=Jan, II=Feb, ..., XII=Dec.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>MMM</samp>
|
||
|
<samp>Mmm</samp>
|
||
|
<samp>MMMMMMMMMM</samp>
|
||
|
<samp>Mmmmmmmmmm</samp>
|
||
|
<samp>MMMMMMMMMZ</samp>
|
||
|
<samp>Mmmmmmmmmz</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
3-char month, uppercase
|
||
|
3-char month, mixed case
|
||
|
20-char month, uppercase
|
||
|
20-char month, mixed case
|
||
|
trailing blanks suppressed
|
||
|
trailing blanks suppressed
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
JAN-DEC
|
||
|
Jan-Dec
|
||
|
JANUARY -DECEMBER
|
||
|
January -December
|
||
|
JANUARY-DECEMBER
|
||
|
January-December
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">For input, source string always folded to
|
||
|
uppercase. For output, <samp>M</samp> generates uppercase and <samp>m</samp>
|
||
|
generates lowercase. Output is padded with blanks ( ) (unless
|
||
|
<samp>Z</samp> specified) or truncated to match the number of
|
||
|
<samp>M</samp>s.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>DD</samp>
|
||
|
<samp>ZD</samp>
|
||
|
<samp>DDD</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
2-digit day of month
|
||
|
1- or 2-digit day of month
|
||
|
day of year (Julian day)
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
01-31
|
||
|
1-31
|
||
|
001-366
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">For output, leading zero suppressed. For input,
|
||
|
<samp>ZD</samp> and <samp>DD</samp> are equivalent. That is, each accepts the
|
||
|
format of the other.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>HH</samp>
|
||
|
<samp>ZH</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
2-digit hour
|
||
|
1- or 2-digit hour
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
00-23
|
||
|
0-23
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">For output, leading zero suppressed. For input,
|
||
|
<samp>ZH</samp> and <samp>HH</samp> are equivalent. That is, each accepts the
|
||
|
format of the other. If <samp>AP</samp> is specified, valid values are
|
||
|
01-12.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP"><samp>MI</samp></td>
|
||
|
<td align="LEFT" valign="TOP">minute</td>
|
||
|
<td align="LEFT" valign="TOP">00-59</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP"><samp>SS</samp></td>
|
||
|
<td align="LEFT" valign="TOP">second</td>
|
||
|
<td align="LEFT" valign="TOP">00-59</td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>9</samp>
|
||
|
<samp>99</samp>
|
||
|
<samp>999</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
tenths of a second
|
||
|
hundredths of a second
|
||
|
thousandths of a second
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
0-9
|
||
|
00-99
|
||
|
000-999
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">No rounding.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>AP</samp>
|
||
|
<samp>ap</samp>
|
||
|
<samp>A.P.</samp>
|
||
|
<samp>a.p.</samp>
|
||
|
</pre>
|
||
|
|
||
|
<br>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">AM/PM indicator</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
AM or PM
|
||
|
am or pm
|
||
|
A.M. or P.M.
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>AP</samp> affects
|
||
|
<samp>HH</samp>/<samp>ZH</samp> field. For input, source string always folded
|
||
|
to uppercase. For output, <samp>AP</samp> generates uppercase and
|
||
|
<samp>ap</samp> generates lowercase.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>W</samp>
|
||
|
<samp>WWW</samp>
|
||
|
<samp>Www</samp>
|
||
|
<samp>WWWWWWWWWW</samp>
|
||
|
<samp>Wwwwwwwwww</samp>
|
||
|
<samp>WWWWWWWWWZ</samp>
|
||
|
<samp>Wwwwwwwwwz</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
1-char day-of-week
|
||
|
3-char day, uppercase
|
||
|
3-char day, mixed case
|
||
|
10-char day, uppercase
|
||
|
10-char day, mixed case
|
||
|
trailing blanks suppressed
|
||
|
trailing blanks suppressed
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
S, M, T, W, T, F, S
|
||
|
SUN-SAT
|
||
|
Sun-Sat
|
||
|
SUNDAY -SATURDAY
|
||
|
Sunday -Saturday
|
||
|
SUNDAY-SATURDAY
|
||
|
Sunday-Saturday
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">For input, <samp>W</samp>s are ignored. For
|
||
|
output, <samp>W</samp> generates uppercase and <samp>w</samp> generates
|
||
|
lowercase. Output padded with blanks (unless <samp>Z</samp> specified) or
|
||
|
truncated to match the number of <samp>W</samp>s.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">All others, not including numbers 0 through 9 and
|
||
|
any characters used in the month or day-of-week names.</td>
|
||
|
<td align="LEFT" valign="TOP">delimiters</td>
|
||
|
<td align="LEFT" valign="TOP">X'01'-X'FF'(X'00' reserved for ILE use.)</td>
|
||
|
<td align="LEFT" valign="TOP">For input, treated as delimiters between the
|
||
|
month, day, year, hour, minute, second, and fraction of a second. For output,
|
||
|
copied exactly as is to the target string.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
<p><strong><a name="TBLPICXMP">Examples of Picture Strings Recognized by ILE
|
||
|
Date and Time APIs</a></strong></p>
|
||
|
|
||
|
<table border cellpadding="3">
|
||
|
<tr>
|
||
|
<th align="LEFT" valign="TOP">Picture String</th>
|
||
|
<th align="LEFT" valign="TOP">Example</th>
|
||
|
<th align="LEFT" valign="TOP">Notes</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>YYMMDD</samp>
|
||
|
<samp>YYYYMMDD</samp>
|
||
|
<samp>YYYY-MM-DD</samp>
|
||
|
|
||
|
<samp><JJJJ> YY.MM.DD</samp>
|
||
|
|
||
|
|
||
|
|
||
|
<samp><CCCC> YY.MM.DD</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
880516
|
||
|
19880516
|
||
|
1988-05-16
|
||
|
|
||
|
<em>Showa</em> 63.05.16
|
||
|
|
||
|
|
||
|
|
||
|
<em>MinKow</em> 77.05.16
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">1988-5-16 would also be valid input.<br>
|
||
|
<br>
|
||
|
<em>Showa</em> is a Japanese era name.<br>
|
||
|
<em>Showa</em> 63 = 1988.<br>
|
||
|
<br>
|
||
|
<em>MinKow</em> is an ROC era name. <em>MinKow</em> 77 = 1988.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>MMDDYY</samp>
|
||
|
<samp>MM/DD/YY</samp>
|
||
|
<samp>ZM/ZD/YY</samp>
|
||
|
<samp>MM/DD/YY</samp>
|
||
|
<samp>MM/DD/Y</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
050688
|
||
|
05/06/88
|
||
|
5/6/88
|
||
|
05/06/1988
|
||
|
05/06/8
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">1-digit year format (<samp>Y</samp>) valid for
|
||
|
output only</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>DD.MM.YY</samp>
|
||
|
<samp>DD-RRRR-YY</samp>
|
||
|
<samp>DD MMM YY</samp>
|
||
|
<samp>DD Mmmmmmmmmm YY</samp>
|
||
|
<samp>ZD Mmmmmmmmmz YY</samp>
|
||
|
<samp>Mmmmmmmmmz ZD, YYYY</samp>
|
||
|
<samp>ZDMMMMMMMMZYY</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
09.06.88
|
||
|
09- VI-88
|
||
|
09 JUN 88
|
||
|
09 June 88
|
||
|
9 June 88
|
||
|
June 9, 1988
|
||
|
9JUNE88
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>Z</samp> suppresses zeros and blanks</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>YY.DDD</samp>
|
||
|
<samp>YYDDD</samp>
|
||
|
<samp>YYYY/DDD</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
88.137
|
||
|
88137
|
||
|
1988/137
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">Julian date</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
<samp>YYMMDDHHMISS</samp>
|
||
|
<samp>YYYYMMDDHHMISS</samp>
|
||
|
<samp>YYYY-MM-DD HH:MI:SS.999</samp>
|
||
|
<samp>WWW, ZM/ZD/YY HH:MI AP</samp>
|
||
|
<samp>Wwwwwwwwwz, DD Mmm YYYY, ZH:MI AP</samp>
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">
|
||
|
<pre>
|
||
|
880516204229
|
||
|
19880516204229
|
||
|
1988-05-16 20:42:29.046
|
||
|
MON, 5/16/88 08:42 PM
|
||
|
Monday, 16 May 1988, 8:42 PM
|
||
|
</pre>
|
||
|
</td>
|
||
|
<td align="LEFT" valign="TOP">Timestamp -- valid only for CEESECS and CEEDATM.
|
||
|
If used with CEEDATE, time positions are left blank. If used with CEEDAYS,
|
||
|
<samp>HH</samp>, <samp>MI</samp>, <samp>SS</samp>, and <samp>999</samp> fields
|
||
|
are ignored.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
<p><strong><a name="TBLERANAME">Japanese Eras Used by ILE Date and Time APIs
|
||
|
When <JJJJ> Specified</a></strong></p>
|
||
|
|
||
|
<table border cellpadding="3">
|
||
|
<tr>
|
||
|
<th align="LEFT" valign="TOP">First date of Japanese Era</th>
|
||
|
<th align="LEFT" valign="TOP">Era Name</th>
|
||
|
<th align="LEFT" valign="TOP">Era Name in IBM Japanese DBCS Code</th>
|
||
|
<th align="LEFT" valign="TOP">Valid Year (YY, ZYY) Values</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">1868-09-08</td>
|
||
|
<td align="LEFT" valign="TOP">Meiji</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>X'0E45A645840F'</samp></td>
|
||
|
<td align="LEFT" valign="TOP">01-45</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">1912-07-30</td>
|
||
|
<td align="LEFT" valign="TOP">Taisho</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>X'0E455B45770F'</samp></td>
|
||
|
<td align="LEFT" valign="TOP">01-15</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">1926-12-25</td>
|
||
|
<td align="LEFT" valign="TOP">Showa</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>X'0E45B3457A0F'</samp></td>
|
||
|
<td align="LEFT" valign="TOP">01-64</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">1989-01-08</td>
|
||
|
<td align="LEFT" valign="TOP">Heisei</td>
|
||
|
<td align="LEFT" valign="TOP"><samp>X'0E458D45BA0F'</samp></td>
|
||
|
<td align="LEFT" valign="TOP">01-999 (01 = 1989)</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<br>
|
||
|
<p><strong><a name="TBLROCERA">Republic of China Eras Used by ILE Date and Time
|
||
|
APIs When <CCCC> or <CCCCCCCC> Specified</a></strong></p>
|
||
|
|
||
|
<table border cellpadding="3">
|
||
|
<tr>
|
||
|
<th align="LEFT" valign="TOP">First date of ROC Era</th>
|
||
|
<th align="LEFT" valign="TOP">Era Name</th>
|
||
|
<th align="LEFT" valign="TOP">Era Name in Traditional Chinese DBCS Code</th>
|
||
|
<th align="LEFT" valign="TOP">Valid Year (YY, ZYY) Values</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP">1912-01-01</td>
|
||
|
<td align="LEFT" valign="TOP"><em>MinKow</em></td>
|
||
|
<td align="LEFT" valign="TOP"><samp>X'0E4D8256CE0F'</samp></td>
|
||
|
<td align="LEFT" valign="TOP">01-999 (77 = 1988)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
<td align="LEFT" valign="TOP"><em>ChuHwaMinKow</em></td>
|
||
|
<td align="LEFT" valign="TOP"><samp>X'0E4C845ADD4D8256CE0F'</samp></td>
|
||
|
<td align="LEFT" valign="TOP"> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
<h3>Example</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li>
|
||
|
<p>Convert a date to the Lilian format to calculate the date 60 days hence:</p>
|
||
|
|
||
|
<pre>
|
||
|
CALL CEEDAYS ('880516','YYMMDD', ndays, fc);
|
||
|
ndays = ndays + 60;
|
||
|
CALL CEEDATE (ndays, 'YYMMDD', newdate, 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>
|
||
|
|