158 lines
9.9 KiB
HTML
158 lines
9.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="DATFMT (Date Format) keyword for display files" />
|
|
<meta name="abstract" content="Use this field-level keyword to specify the format of a date field. This keyword is only valid for date fields (data type L)." />
|
|
<meta name="description" content="Use this field-level keyword to specify the format of a date field. This keyword is only valid for date fields (data type L)." />
|
|
<meta name="DC.subject" content="DATFMT (Date Format) keyword, Date Format (DATFMT) keyword" />
|
|
<meta name="keywords" content="DATFMT (Date Format) keyword, Date Format (DATFMT) keyword" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzakcmstdfdatfmt" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- 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. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>DATFMT (Date Format) keyword for display files</title>
|
|
</head>
|
|
<body id="rzakcmstdfdatfmt"><a name="rzakcmstdfdatfmt"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">DATFMT (Date Format) keyword for display files</h1>
|
|
<div><p>Use this field-level keyword to specify the format of a date field.
|
|
This keyword is only valid for date fields (data type L).</p>
|
|
<div class="section"><p>The format of the keyword is:</p>
|
|
<pre>DATFMT(date-format)</pre>
|
|
<p>The
|
|
date-format parameter specifies date formats. The following table describes
|
|
the valid date formats and their default separator values.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="top" width="19.94949494949495%" id="d0e33">Format name</th>
|
|
<th align="left" valign="top" width="19.94949494949495%" id="d0e35">Date-format parameter</th>
|
|
<th align="left" valign="top" width="19.94949494949495%" id="d0e37">Date format and separator</th>
|
|
<th align="left" valign="top" width="19.94949494949495%" id="d0e39">Field length</th>
|
|
<th align="left" valign="top" width="20.2020202020202%" id="d0e41">Example</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">Job default</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*JOB</td>
|
|
<td valign="top" width="19.94949494949495%" headers="d0e37 "> </td>
|
|
<td valign="top" width="19.94949494949495%" headers="d0e39 "> </td>
|
|
<td valign="top" width="20.2020202020202%" headers="d0e41 "> </td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">Month/Day/Year</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*MDY</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">mm/dd/yy</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">8</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">06/21/90</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">Day/Month/Year</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*DMY</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">dd/mm/yy</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">8</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">21/06/90</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">Year/Month/Day</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*YMD</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">yy/mm/dd</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">8</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">90/06/21</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">Julian</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*JUL</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">yy/ddd</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">6</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">90/172</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">International Standards Organization</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*ISO</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">yyyy-mm-dd</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">10</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">1990-06-21</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">IBM<sup>®</sup> USA Standard</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*USA</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">mm/dd/yyyy</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">10</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">06/21/1990</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">IBM European Standard</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*EUR</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">dd.mm.yyyy</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">10</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">21.06.1990</td>
|
|
</tr>
|
|
<tr><td align="left" valign="top" width="19.94949494949495%" headers="d0e33 ">Japanese Industrial Standard Christian Era</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e35 ">*JIS</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e37 ">yyyy-mm-dd</td>
|
|
<td align="left" valign="top" width="19.94949494949495%" headers="d0e39 ">10</td>
|
|
<td align="left" valign="top" width="20.2020202020202%" headers="d0e41 ">1990-06-21</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>If you do not specify the DATFMT keyword, the default is *ISO.</p>
|
|
<p>If
|
|
you specify *JOB, the high level language and the application handle the format
|
|
as *ISO. On output the system converts the format to the format specified
|
|
by the Date Format Job Definition Attribute. On input, the system converts
|
|
the format to *ISO before it passes control to the application. There are
|
|
always 10 spaces reserved on the display screen for a Date field with DATFMT(*JOB),
|
|
even though 8 characters in the case of *MDY, *DMY, and *YMD, or 6 characters
|
|
in the case of *JUL are displayed.</p>
|
|
<p>The format of DFT, DFTVAL, and MAPVAL
|
|
keyword values must match the format that the DATFMT keyword specifies. If
|
|
the DATFMT keyword specifies *JOB or the DATFMT keyword is set to *ISO as
|
|
default, these values must have a format of *ISO.</p>
|
|
<p>If you specify the
|
|
*ISO, *USA, *EUR, or *JIS value, you cannot specify the DAT keyword. These
|
|
date formats have fixed separators.</p>
|
|
<p>The DATFMT keyword overrides the
|
|
job attribute for a date field. It does not change the system default.</p>
|
|
<p>It
|
|
is the responsibility of the high-level language and the application to format
|
|
the date field according to the format specified on the DATFMT keyword and
|
|
use the separators specified on the DATSEP keyword. The system does not format
|
|
fields on output. The system validates the date field (L data type) on input
|
|
according to the format the DATFMT keyword specifies and the separator that
|
|
the DATSEP keyword specifies.</p>
|
|
<p>Option indicators are not valid for this
|
|
keyword, although option indicators can be used to condition the field for
|
|
which it is specified.</p>
|
|
</div>
|
|
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
|
|
the DATFMT keyword.</p>
|
|
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
|
|
00010A
|
|
00020A R RECORD
|
|
00030A DATFLD1 L B 5 2DATFMT(*JUL)
|
|
00040A DATFLD2 L B 5 22DATFMT(*EUR)
|
|
00050A DATFLD3 L B 5 42DATFMT(*JOB)
|
|
A</pre>
|
|
<p>If the date to be displayed is June 21, 1990, the date
|
|
format defined in the Job Definition Attributes is *MDY and the date separator
|
|
defined in the Job Definition Attributes is a slash (/), the following values
|
|
are displayed when RECORD is written.</p>
|
|
<pre>DATFLD1 90/172
|
|
DATFLD2 21.06.1990
|
|
DATFLD3 06/21/90</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstkeyent.htm" title="You type the keyword entries that define display files in positions 45 through 80 (functions).">DDS keyword entries for display files (positions 45 through 80)</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |