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

218 lines
12 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="reference" />
<meta name="DC.Title" content="Notes on the delimited import file (CPYFRMIMPF command)" />
<meta name="abstract" content="The characters and data types discussed in this topic interpret the import file's data for a delimited import file." />
<meta name="description" content="The characters and data types discussed in this topic interpret the import file's data for a delimited import file." />
<meta name="DC.Relation" scheme="URI" content="rbal3usingcpyfrm.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3delimp" />
<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>Notes on the delimited import file (CPYFRMIMPF command)</title>
</head>
<body id="rbal3delimp"><a name="rbal3delimp"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Notes on the delimited import file (CPYFRMIMPF command)</h1>
<div><p>The characters and data types discussed in this topic interpret
the import file's data for a delimited import file.</p>
<div class="section"><dl><dt class="dlterm">Blanks</dt>
<dd>Blanks are treated in the following ways: <ul><li>All leading blanks and trailing blanks are discarded for character fields
unless enclosed by string delimiters, according to the RMVBLANK parameter.</li>
<li><img src="./delta.gif" alt="Start of change" />A field of all blanks is interpreted as a field of one
single blank character unless RMVBLANK *NONE is specified.<img src="./deltaend.gif" alt="End of change" /></li>
<li>You cannot embed blanks inside numeric data.</li>
<li>You cannot select a blank as a field or record delimiter.</li>
</ul>
<p>The RMVBLANK parameter has the following options:</p>
<ul><li>*NONE: All leading and trailing blanks are retained.</li>
<li>*LEADING: Leading blanks are removed. This is the default value.</li>
<li>*TRAILING: Trailing blanks are removed.</li>
<li>*BOTH: Leading and trailing blanks are removed.</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> Removal of blanks, as specified by the RMVBLANK parameter, takes
precedence over string delimiters.</div>
</dd>
<dt class="dlterm"><img src="./delta.gif" alt="Start of change" />Null fields<img src="./deltaend.gif" alt="End of change" /></dt>
<dd><img src="./delta.gif" alt="Start of change" />A null field is defined as: <ul><li>Two adjacent field delimiters (no data in between).</li>
<li>Two adjacent string delimiters (no data in between).</li>
<li>A field delimiter followed by a record delimiter (no data in between),
an empty string.</li>
</ul>
<p>If the field is null, the following statement is true:</p>
<ul><li>If the record's output field is not nullable and the import is a null
field, the record is not to be copied, and an error is signaled.</li>
</ul>
<img src="./deltaend.gif" alt="End of change" /></dd>
<dt class="dlterm"><img src="./delta.gif" alt="Start of change" />Delimiters<img src="./deltaend.gif" alt="End of change" /></dt>
<dd><img src="./delta.gif" alt="Start of change" /> <ul><li>A field or record delimiter cannot be a blank.</li>
<li>A string delimiter or a string escape character cannot be the same as
a field delimiter, a record delimiter, a decimal point, a date separator,
or a time separator.</li>
<li>A string delimiter can enclose all fields when the string escape character
STRESCCHR(*NONE) is specified. The string delimiter character should not be
contained within the character string.</li>
<li>A field delimiter can not be the same as a record delimiter.</li>
<li>When a string delimiter character is contained by a string, precede the
string delimiter in the string with the string escape character specified
with the STRESCCHR parameter.</li>
<li>The defaults for delimiters are as follows: <ul><li>String is: *DBLQUOTE (double quotation mark)</li>
<li>Field is: , (comma)</li>
<li>Decimal separator is: . (period)</li>
<li>Record is *EOR (end of record)</li>
</ul>
</li>
<li>If the data type of the from is CHARACTER, OPEN, EITHER, or ONLY, all
double byte data must be contained within string delimiters or shift characters
(for OPEN, EITHER, ONLY data type). <div class="note"><span class="notetitle">Note:</span> String delimiters have lower precedence
than leading blanks and trailing blanks.</div>
</li>
</ul>
<img src="./deltaend.gif" alt="End of change" /></dd>
<dt class="dlterm"><img src="./delta.gif" alt="Start of change" />String escape character<img src="./deltaend.gif" alt="End of change" /></dt>
<dd><img src="./delta.gif" alt="Start of change" />When a string delimiter character is contained by a string, you can use
the STRESCCHR parameter to specify a string escape character for indicating
that the string delimiter character should be treated as a normal character
instead of string delimiter.<div class="p">The STRESCCHR parameter has the following options:<ul><li>*NONE: No string escape character is used.</li>
<li>*STRDLM: The string delimiter is used as the string escape character.</li>
<li><var class="varname">character-value</var> - The <var class="varname">character-value</var> is
used as the string escape character.</li>
</ul>
</div>
<img src="./deltaend.gif" alt="End of change" /></dd>
<dt class="dlterm">Numeric field</dt>
<dd> <ul><li>Numeric fields can be imported in decimal or exponential form.</li>
<li>Data to the right of the decimal point might be truncated depending on
the output data format.</li>
<li>Decimal separators are either a period or a comma (command option).</li>
<li>Signed numeric fields are supported, + or -.</li>
</ul>
</dd>
<dt class="dlterm">Character or Varcharacter fields</dt>
<dd> <ul><li>Fields too large to fit in the output fields are truncated (right). The
server sends a diagnostic message. </li>
<li>An empty string is defined as two string delimiters with no data between
them.</li>
<li>For the server to recognize a character as a starting or ending string
delimiter, it must be the first or last character in the field after the RMVBLANK
option has been applied. For example, 'abc' with ' as the delimiter is the
same as abc.</li>
</ul>
</dd>
<dt class="dlterm">IGC or VarIGC fields</dt>
<dd> <ul><li>The server copies data from the from-file to the to-file. If any of the
data is not valid, the server generates a mapping error. </li>
<li>Data located between the Shift Out and Shift In characters is treated
as double-byte data. This data is also not parsed for delimiters. The Shift
characters in this case become "string delimiters".</li>
</ul>
</dd>
<dt class="dlterm">Graphic, VarGraphic fields</dt>
<dd>The server copies the data from the from-file to the to-file.</dd>
<dt class="dlterm">CCSIDs</dt>
<dd> <ul><li>The data from the from-file is read into a buffer by the CCSID of the
from-file. The data in the buffer is checked and written to the to-file. The
CCSID of the open to-file is set to the value of the from-file, unless a to-file
CCSID is used. <p><img src="./delta.gif" alt="Start of change" />If a to-file CCSID is used, the data is
converted to that CCSID. If the CCSID of the to-file field is 65535, the data
is converted to the CCSID specified in the to CCSID (TOCCSID) parameter. <img src="./deltaend.gif" alt="End of change" /></p>
<div class="p">If
the from-file is a tape file, and the FROMCCSID(*FILE) is specified, the following
limits apply: <ul><li>The job CCSID is used or</li>
<li>The from-file CCSID is requested by the user</li>
</ul>
</div>
</li>
<li>The character data (delimiters) passed on the command are converted to
the CCSID of the from file. This allows the character data of the from-file
and command parameters to be compatible.</li>
</ul>
</dd>
<dt class="dlterm">Date field</dt>
<dd> <ul><li>All date formats supported by <span class="keyword">iSeries™</span> can
be imported (*ISO, *USA, *EUR, *JIS, *MDY, *DMY, *YMD, *JUL, and *YYMD).</li>
<li>You can copy a date field to a timestamp field.</li>
</ul>
</dd>
<dt class="dlterm">Time field</dt>
<dd> <ul><li>All time formats supported by <span class="keyword">iSeries</span> can
be imported (*ISO, *USA, *EUR, *JIS, *HMS).</li>
<li>You can copy a time field to a timestamp field.</li>
</ul>
</dd>
<dt class="dlterm">Date and time separators</dt>
<dd>The server supports all valid separators for date and time fields.</dd>
<dt class="dlterm">Timestamp field</dt>
<dd>Timestamp import fields must be 26 bytes. The import ensures that periods
exist in the time portion, and a dash exists between the date and time portions
of the timestamp.</dd>
<dt class="dlterm">LOB field</dt>
<dd>LOB data fields require using secondary stream files that contain the
LOB data. The imported data file lists the name of the stream file containing
the LOB data. The Field Definition File (FDF) that describes the offsets of
the fields in the data file, also describes the offsets of the LOB file name
field (not the LOB field itself). <p>An example of importing LOB data:</p>
<p>FDF
file:</p>
<pre>COLCHAR10 1 10 42
COLLOB 12 40 44
*END</pre>
<p>The data file would be 44 characters in record length,
containing the following data:</p>
<pre>0 1 2 3 4
12345678901234567890123456789012345678901234
aaaaaaaaaa /lobdata/lob1.dat N N
bbbbbb /lobdata/lob2.dat N N
/lobdata/lob3.dat Y N
cccccccccc N Y</pre>
<div class="note"><span class="notetitle">Notes:</span> For each record in the imported data file: <ol><li>Characters 110 are data for a column named COLCHAR10, with the null indicator
at byte position 42.</li>
<li>Characters 1240 are data for a column named COLLOB, with the null indicator
at byte position 44. The COLLOB value is the name of the file which contains
the LOB data.</li>
<li>In this example, there are 3 data files (lob1.dat, lob2.dat, and lob3.dat)
which contain the actual LOB data to be imported.</li>
</ol>
</div>
</dd>
<dt class="dlterm">Number of fields mismatch</dt>
<dd>If the from-file or to-file do not have the same number of fields, the
data is either truncated to the smaller to-file size, or the extra to-file
fields will receive a null value. If the fields cannot contain null values,
the server issues an error message. </dd>
<dt class="dlterm">Multiple jobs</dt>
<dd>The number of jobs that are used to copy the data depends on the DEGREE(*NBRTASKS)
parameter of the CHGQRYA command. When multiple jobs are used, the server
uses batch jobs to copy the data. The user can change, hold or end these batch
jobs. The copy does not complete until all the started batch jobs complete. <p>The
relative record numbers can be maintained only if a single job is used and
the import file does not contain any deleted records. If the from-file is
a distributed physical file or logical file, the server performs the copy
in a single process.</p>
<p>Files with less than 50 000 records use only one
job.</p>
</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3usingcpyfrm.htm" title="The Copy From Import File (CPYFRMIMPF) command maps or parses the data from (&#34;import&#34;) an import file to the to-file.">Use the Copy From Import File (CPYFRMIMPF) command to copy between different servers</a></div>
</div>
</div>
</body>
</html>