ibm-information-center/dist/eclipse/plugins/i5OS.ic.dm_5.4.0.1/rbal3dt.htm

409 lines
30 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<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="concept" />
<meta name="DC.Title" content="Date, time, and timestamp fields using FMTOPT(*MAP) or FMTOPT(*NOCHK)" />
<meta name="DC.Relation" scheme="URI" content="rbal3specdata.htm" />
<meta name="DC.Relation" scheme="URI" content="../dds/kickoff.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3dt" />
<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>Date, time, and timestamp fields using FMTOPT(*MAP) or FMTOPT(*NOCHK)</title>
</head>
<body id="rbal3dt"><a name="rbal3dt"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Date, time, and timestamp fields using FMTOPT(*MAP) or FMTOPT(*NOCHK)</h1>
<div><div class="p">You must specify FMTOPT(*MAP) or FMTOPT(*NOCHK) on the CPYF command in
any of the follow cases:<ul><li>The from-file is a database data file.</li>
<li>The to-file is a physical data file.</li>
<li>The record formats are not identical.</li>
</ul>
Corresponding date, time, and timestamp fields in the from-file and
to-file must have the same format attribute and separator for the record formats
to be identical. For the <a href="../cl/cpyfrmqryf.htm">CPYFRMQRYF</a> command,
the same is true except that the open query file record format is used (rather
than a from-file format).</div>
<p>When using FMTOPT(*NOCHK), record data is copied directly from left to
right into the to-file without any regard to field types.</p>
<p>When using FMTOPT(*CVTSRC), data portions of records are directly copied
from left to right into the to-file without any regard to the field types.</p>
<p>When using FMTOPT(*DROP), fields in the from-file but not in the to-file
are dropped. If any like-named fields in the from-file and to-file are date,
time, or timestamp fields, the corresponding field must be the same type,
have the same format attribute and separator, and have the same relative position
in the record format as the like-named field, otherwise FMTOPT(*MAP) might
also be required.</p>
<p>FMTOPT(*MAP) allows copying between like date, time, and timestamp field
types regardless of the format or separator. Also, copies from and to date,
time, and timestamp fields are allowed from and to zoned-decimal or character
field types, provided the lengths, formats, and values can be converted. FMTOPT(*MAP)
is required in this case for conversion to the to-field type (format and separator,
if it applies).</p>
<p><a href="#rbal3dt__rbal3tas">Table 1</a> outlines the conversion possibilities
for the date, time, and timestamp.</p>
<table cellpadding="4" cellspacing="0" border="1" class="tableborder"><tr><td>
<a name="rbal3dt__rbal3tas"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="rbal3dt__rbal3tas" width="100%" border="0"><caption>Table 1. Conversion Table</caption><thead align="left"><tr><th align="left" valign="bottom" width="14.694656488549619%" id="d0e45">Data types</th>
<th align="left" valign="bottom" width="23.66412213740458%" id="d0e47">Forms</th>
<th align="left" valign="bottom" width="17.36641221374046%" id="d0e49">Allowable field length</th>
<th align="left" valign="bottom" width="10.305343511450381%" id="d0e51">Direction</th>
<th align="left" valign="bottom" width="10.687022900763358%" id="d0e53">Data type</th>
<th align="left" valign="bottom" width="11.641221374045802%" id="d0e55">Formats</th>
<th align="left" valign="bottom" width="11.641221374045802%" id="d0e57">Allowable field length</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Date</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">Any date format</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6, 8, or 10</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Zoned</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(MMDDYY)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6,0</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Zoned</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(DDMMYY)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6,0</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Zoned</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYMMDD)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6,0</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Zoned</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYDDD)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">5,0</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(MMdDDdYY)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(DDdMMdYY)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYdMMdDD)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYdDDD)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*USA)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*ISO)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*EUR)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*JIS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYYYDDD)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Date</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">6, 8, or 10</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Time</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">Any time format</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">8</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Zoned</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(HHMMSS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">6,0</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(HHtMMtSS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">4 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*USA)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">4 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*ISO)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">4 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*EUR)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">4 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(*JIS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">4 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(HHtMMtSS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">8 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;----</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Time</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">Any</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">8</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Timestamp</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">SAA<sup>®</sup> format</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">26</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Timestamp</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">SAA</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">26</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Zoned</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYYYMMDDHHMMSS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">14,0</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Timestamp</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">SAA</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">26</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">SAA format</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">14 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 "> ----&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Timestamp</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">SAA</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">26</td>
</tr>
<tr><td align="left" valign="bottom" width="14.694656488549619%" headers="d0e45 ">Character</td>
<td align="left" valign="bottom" width="23.66412213740458%" headers="d0e47 ">(YYYYMMDDHHMMSS)</td>
<td align="left" valign="bottom" width="17.36641221374046%" headers="d0e49 ">14 min</td>
<td align="left" valign="bottom" width="10.305343511450381%" headers="d0e51 ">&lt;--&gt;</td>
<td align="left" valign="bottom" width="10.687022900763358%" headers="d0e53 ">Timestamp</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e55 ">SAA</td>
<td align="left" valign="bottom" width="11.641221374045802%" headers="d0e57 ">26</td>
</tr>
<tr><td colspan="7" align="left" valign="top" headers="d0e45 d0e47 d0e49 d0e51 d0e53 d0e55 d0e57 "> <div class="note"><span class="notetitle">Note:</span> In
the format columns, <dl><dt class="dlterm">d</dt>
<dd>= date separator value</dd>
<dt class="dlterm">t</dt>
<dd>= time separator value</dd>
<dt class="dlterm">any</dt>
<dd>= job formats or SAA formats</dd>
</dl>
In the allowable field-length column, <em>min</em> means the
specified length is the minimum required for a conversion attempt. Conversion
errors might still occur if the length is not long enough for the assumed
format that you want. Refer to the <a href="../dds/kickoff.htm">DDS concepts</a> for more information about the date, time,
and timestamp data types and keywords.</div>
</td>
</tr>
</tbody>
</table>
</td></tr></table>
<div class="p"><strong><em>When converting a character field to a date, time, or timestamp field;</em></strong> FMTOPT(*MAP)
is specified; and the corresponding from- and to-field names match; an attempt
is made to determine what similar date form the character field is in. The
following rules applies: <ul><li><strong><em>For converting a character field to a date field,</em></strong> the minimum
length required for the character field is 6. The server first determines
if the character field data is in the same format and has the same separator
as specified in the current job under which the copy command is running. This
might be *MDY, *DMY, *YMD, or *JUL for the format and slash (/), hyphen (-),
period (.), comma (,), or blank ( ) for the separator. If the character field
is not in the current job specified format and separator form, it determines
if it is in one of the SAA formats (*ISO, *USA, *EUR, or *JIS), or if it is
in a YYYYDDD form (no separator). If the server determines the character field
is in one of the these forms, it converts it to the date to-field. The date
portion of the character field must be left justified and can contain trailing
blanks.</li>
<li><strong><em>For converting a character field to a time field,</em></strong> the minimum
length required for the character field is 4. The server first determines
if the character field data is in the same format and has the same separator
as specified in the current job under which the copy command is running. This
might be *HMS for the format and colon (:), comma (,), period (.), or blank
( ) for the separator. If the character field is not in the current job specified
format and separator form, the server determines if it is in one of the SAA formats
(*ISO, *USA, *EUR, or *JIS). If the server determines the character field
is in one of these forms, it converts it to the time to-field. The time portion
of the character field must be left justified and can contain trailing blanks.</li>
<li><strong><em>For converting a character field to a timestamp field,</em></strong> the
minimum length required for the character field is 14. The server first determines
if the character field data is in one of the following types: <ul><li>SAA format</li>
<li>YYYYMMDDHHMMSS form</li>
</ul>
If the server determines the character field is in one of these forms,
it converts it to the timestamp to-field. The timestamp portion of the character
field must be left justified and can contain trailing blanks.</li>
</ul>
</div>
<div class="p"><strong><em>When converting a date, time, or timestamp field to a character field;</em></strong> FMTOPT(*MAP)
is specified; and the corresponding from and to-file field names match; the
server attempts to convert the date, time, or timestamp field into the form
specified by the current job. The following rules applies: <ul><li><strong><em>For converting a date field to a character field,</em></strong> the minimum
length required for the character field is 6. The server first determines
the date format and separator attribute of the current job under which the
copy command is running. This might be *MDY, *DMY, *YMD, or *JUL for the format
and slash (/), hyphen (-), period (.), comma (,), or blank ( ) for the separator.
The date field is converted into the character field in the specified format
of the current job. For character fields that are longer than required for
the conversion, the data is left justified and trailing blanks are added.</li>
<li><strong><em>For converting a time field to a character field,</em></strong> the minimum
length required for the character field is 8. The server first determines
the time separator attribute of the current job under which the copy command
is running. This might be colon (:), comma (,), period (.), or blank ( ).
The time field is converted into the character field in the *HMS format (including
the specified separator of the current job). For character fields that are
longer than required for the conversion, the data is left justified and trailing
blanks are added.</li>
<li><strong><em>For converting a timestamp field to a character field,</em></strong> the
minimum length required for the character field is 14. The timestamp field
is converted into the character field in the YYYYMMDDHHMMSS form (no separators).
For character fields that are longer than required for the conversion, the
data is left justified and trailing blanks are added.</li>
</ul>
</div>
<div class="p"><strong><em>When converting a zoned decimal field to a date, time, or timestamp
field,</em></strong> FMTOPT(*MAP) is specified and the corresponding from- and to-field
names match, the server assumes the zoned decimal field is in the form specified
by the current job. The following rules applies: <ul><li><strong><em>For converting a zoned decimal field to a date field,</em></strong> the
server assumes the zoned decimal field data is in the same date format (no
separators) as specified in the current job under which the copy command is
running. This might be *MDY, *DMY, *YMD, or *JUL. The length of the zoned
decimal field must be 5,0 (if the current job format is *JUL) or 6,0 (if the
current job format is *MDY, *DMY, or *YMD). The server attempts to convert
or copy it to the date to-field.</li>
<li><strong><em>For converting a zoned decimal field to a time field,</em></strong> the
server assumes the zoned decimal field data is in the *HMS format (no separators).
The length of the zoned decimal field must be 6,0. The server attempts to
convert or copy it to the time to-field.</li>
<li><strong><em>For converting a zoned decimal field to a timestamp field,</em></strong> the
server assumes the zoned decimal field data is in the YYYYMMDDHHMMSS form
(no separators). The length of the zoned decimal field must be 14,0. The server
attempts to convert or copy it to the timestamp to-field.</li>
</ul>
</div>
<div class="p"><strong><em>When converting a date, time, or timestamp field to a zoned decimal
field,</em></strong> FMTOPT(*MAP) is specified and the corresponding from- and to-field
names match, the server uses the current job specified form to determine what
format the zoned decimal data should be in. The following applies: <ul><li><strong><em>For converting a date field to a zoned decimal field,</em></strong> the
server assumes the zoned decimal field data is to be in the same date format
(no separators) as specified in the current job under which the copy command
is running. This might be *MDY, *DMY, *YMD, or *JUL. The length of the zoned
decimal field must be 5,0 (if the current job format is *JUL) or 6,0 (if the
current job format is *MDY, *DMY, or *YMD). The server attempts to convert
or copy the date field to it.</li>
<li><strong><em>For converting a time field to a zoned decimal field,</em></strong> the
server assumes the zoned decimal field data is to be in the *HMS format (no
separators). The length of the zoned decimal field must be 6,0. The server
attempts to convert or copy the time field to it.</li>
<li><strong><em>For converting a timestamp field to a zoned decimal field,</em></strong> the
server assumes the zoned decimal field data is to be in the YYYYMMDDHHMMSS
form (no separators). The length of the zoned decimal field must be 14,0.
The server attempts to convert or copy the timestamp field to it.</li>
</ul>
</div>
<p>Any conversion not successful because of a data value, data format, or
data-length error causes an information message to be sent. The to-file field
is set with its default value.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3specdata.htm" title="You can use FMTOPT(*MAP) to map data between fixed-length and variable-length fields and between variable-length fields with different maximum lengths.">Specify data for different field types and attributes</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../dds/kickoff.htm">DDS concepts</a></div>
</div>
</div>
</body>
</html>