695 lines
26 KiB
HTML
695 lines
26 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">
|
||
|
<title>Copy To Import File (CPYTOIMPF)</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body bgcolor="white">
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<a name="CPYTOIMPF.Top_Of_Page"></a>
|
||
|
<h2>Copy To Import File (CPYTOIMPF)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
||
|
<b>Threadsafe: </b>No
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#CPYTOIMPF.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#CPYTOIMPF.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#CPYTOIMPF.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="CPYTOIMPF"></a>
|
||
|
<p>The Copy To Import File (CPYTOIMPF) command copies an externally-described file to an import file. The term <u> import file</u> is used to describe a file created for purposes of copying data between heterogeneous databases. The import file (TOSTMF or TOFILE parameter) will be called the <u> to-file</u> for this command.
|
||
|
</p>
|
||
|
<p>Some of the specific functions that can be performed by the CPYTOIMPF command include the following:
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>Copying from an externally described physical file to the to-file (TOFILE or TOSTMF parameter).
|
||
|
</li>
|
||
|
<li>Adding records to an existing to-file member or replacing the contents of the to-file member (MBROPT parameter).
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p><b>Error Handling:</b> The escape message CPF2817 is sent for many different error conditions that can occur during a copy operation. At least one diagnostic message that indicates the specific error condition always comes before the escape message. More information on handling errors is in the Files and file systems topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
||
|
</p>
|
||
|
<p><b>Overrides:</b> All overrides are in effect for this command. The parameters of the overrides that are supported by CPYTOIMPF are:
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>FILE
|
||
|
</li>
|
||
|
<li>MBR
|
||
|
</li>
|
||
|
<li>OPNSCOPE
|
||
|
</li>
|
||
|
<li>SHARE
|
||
|
</li>
|
||
|
<li>LVLCHECK
|
||
|
</li>
|
||
|
<li>RCDFMTLCK
|
||
|
</li>
|
||
|
<li>SEQONLY
|
||
|
</li>
|
||
|
<li>INHWRT
|
||
|
</li>
|
||
|
<li>WAITRCD
|
||
|
</li>
|
||
|
<li>DSTDTA
|
||
|
</li>
|
||
|
<li>NBRRCDS
|
||
|
</li>
|
||
|
<li>STMFCODPAG
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p><b>Status Message:</b> During the running of the CPYTOIMPF command, message CPI2801 is sent as a status message informing the interactive user that a copy is occurring. More information on preventing status messages from appearing is in the Files and file systems topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
||
|
</p>
|
||
|
<p><b>Restrictions:</b>
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>During the time a CPYTOIMPF request is run, the file specified for the <b>To data base file (TOFILE)</b> parameter may be locked (similar to an *EXCL lock with no timeout) so that no access is possible.
|
||
|
</li>
|
||
|
<li>If the from-file has the SHARE(*YES) attribute, unpredictable results can occur. Therefore, if the from-file is defined with SHARE(*YES), the user should make sure the file is not opened by any process prior to the copy.
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="CPYTOIMPF.PARAMETERS.TABLE">Parameters</a></h3>
|
||
|
<table border="1" cellpadding="4" cellspacing="0">
|
||
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
||
|
<tr>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="5"><a href="#CPYTOIMPF.FROMFILE"><b>FROMFILE</b></a></td>
|
||
|
<td valign="top">From file</td>
|
||
|
<td valign="top"><i>Element list</i></td>
|
||
|
<td valign="top" rowspan="5">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Element 1: File</td>
|
||
|
<td valign="top">
|
||
|
<i>Qualified object name</i></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" style="padding-left:10pt">Qualifier 1: File</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Element 2: Member</td>
|
||
|
<td valign="top">
|
||
|
<i>Name</i>, <b><u>*FIRST</u></b>, *ALL</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="5"><a href="#CPYTOIMPF.TOFILE"><b>TOFILE</b></a></td>
|
||
|
<td valign="top">To data base file</td>
|
||
|
<td valign="top"><i>Element list</i></td>
|
||
|
<td valign="top" rowspan="5">Optional, Positional 2</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Element 1: File</td>
|
||
|
<td valign="top">
|
||
|
<i>Qualified object name</i></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" style="padding-left:10pt">Qualifier 1: File</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Element 2: Member</td>
|
||
|
<td valign="top">
|
||
|
<i>Name</i>, <b><u>*FIRST</u></b>, *FROMMBR, *ALL</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.TOSTMF"><b>TOSTMF</b></a></td>
|
||
|
<td valign="top">To stream file</td>
|
||
|
<td valign="top"><i>Path name</i></td>
|
||
|
<td valign="top">Optional, Positional 3</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.MBROPT"><b>MBROPT</b></a></td>
|
||
|
<td valign="top">Replace or add records</td>
|
||
|
<td valign="top"><b><u>*ADD</u></b>, *REPLACE</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.FROMCCSID"><b>FROMCCSID</b></a></td>
|
||
|
<td valign="top">From CCSID</td>
|
||
|
<td valign="top">1-65533, <b><u>*FILE</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.TOCCSID"><b>TOCCSID</b></a></td>
|
||
|
<td valign="top">To CCSID</td>
|
||
|
<td valign="top">1-65533, <b><u>*FILE</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.STMFCODPAG"><b>STMFCODPAG</b></a></td>
|
||
|
<td valign="top">Stream file code page</td>
|
||
|
<td valign="top">1-32767, <b><u>*STMF</u></b>, *PCASCII, *STDASCII</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.RCDDLM"><b>RCDDLM</b></a></td>
|
||
|
<td valign="top">Record delimiter</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*EOR</u></b>, *CRLF, *LF, *CR, *LFCR</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.DTAFMT"><b>DTAFMT</b></a></td>
|
||
|
<td valign="top">Record format of import file</td>
|
||
|
<td valign="top"><b><u>*DLM</u></b>, *FIXED</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.STRDLM"><b>STRDLM</b></a></td>
|
||
|
<td valign="top">String delimiter</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*DBLQUOTE</u></b>, *NONE</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.STRESCCHR"><b>STRESCCHR</b></a></td>
|
||
|
<td valign="top">String escape character</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*STRDLM</u></b>, *NONE</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.RMVBLANK"><b>RMVBLANK</b></a></td>
|
||
|
<td valign="top">Remove blanks</td>
|
||
|
<td valign="top"><b><u>*NONE</u></b>, *LEADING, *TRAILING, *BOTH</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.FLDDLM"><b>FLDDLM</b></a></td>
|
||
|
<td valign="top">Field delimiter</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>','</u></b>, *TAB</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.NULLIND"><b>NULLIND</b></a></td>
|
||
|
<td valign="top">Null field indicator</td>
|
||
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.DECPNT"><b>DECPNT</b></a></td>
|
||
|
<td valign="top">Decimal point</td>
|
||
|
<td valign="top"><b><u>*PERIOD</u></b>, *COMMA</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.DATFMT"><b>DATFMT</b></a></td>
|
||
|
<td valign="top">Date format</td>
|
||
|
<td valign="top"><b><u>*ISO</u></b>, *USA, *EUR, *JIS, *YYMD</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CPYTOIMPF.TIMFMT"><b>TIMFMT</b></a></td>
|
||
|
<td valign="top">Time format</td>
|
||
|
<td valign="top"><b><u>*ISO</u></b>, *USA, *EUR, *JIS</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="CPYTOIMPF.FROMFILE"></a>
|
||
|
<h3>From file (FROMFILE)</h3>
|
||
|
<p>Specifies the file that contains the records to be copied. The database file can be a single-format logical, physical, or multi-system file.
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
<p><b>Element 1: File</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b></b></dt>
|
||
|
<dd>
|
||
|
<p><b>Qualifier 1: File</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the file that contains the records to be copied.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
<dt><b></b></dt>
|
||
|
<dd>
|
||
|
<p><b>Qualifier 2: Library</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>All libraries in the library list for the current thread are searched until the first match is found.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the library to be searched.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Element 2: Member</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FIRST</u></b></dt>
|
||
|
<dd>The first member (in order of creation date) in the specified from-file is used. Specifying *FIRST is not allowed if the from-file has no members.
|
||
|
</dd>
|
||
|
<dt><b>*ALL</b></dt>
|
||
|
<dd>All members of the specified file are copied.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the from-file member containing the records to copy.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.TOFILE"></a>
|
||
|
<h3>To data base file (TOFILE)</h3>
|
||
|
<p>Specifies the database file to receive the copied records. Either this parameter or the TOSTMF parameter is required.
|
||
|
</p>
|
||
|
<p>The to-file can be any of the following file types:
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>source physical file
|
||
|
</li>
|
||
|
<li>program-described physical file
|
||
|
</li>
|
||
|
<li>externally-described physical file with one non-numeric field.
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p><b>Element 1: File</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b></b></dt>
|
||
|
<dd>
|
||
|
<p><b>Qualifier 1: File</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the file to receive the copied records.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
<dt><b></b></dt>
|
||
|
<dd>
|
||
|
<p><b>Qualifier 2: Library</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>All libraries in the library list for the current thread are searched until the first match is found.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the library to be searched.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Element 2: Member</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FIRST</u></b></dt>
|
||
|
<dd>The first member (in order of creation date) in the specified to-file is used.
|
||
|
<p>Specifying *FIRST is not allowed if the specified to-file has no members and there is no override (OVRDBF command) in effect that specified a member name for the to-file.
|
||
|
</p>
|
||
|
</dd>
|
||
|
<dt><b>*ALL</b></dt>
|
||
|
<dd>The data is copied to the correct to-member of the partitioned table. *ALL is only valid for partitioned tables.
|
||
|
</dd>
|
||
|
<dt><b>*FROMMBR</b></dt>
|
||
|
<dd>Corresponding from-file and to-file member names are used.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the to-file member to receive the copied records. If a member with the specified name does not already exist in the to-file, the member will be added.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.TOSTMF"></a>
|
||
|
<h3>To stream file (TOSTMF)</h3>
|
||
|
<p>Specifies the output stream file to which data is to be copied. Either this parameter or the TOFILE parameter is required. All directories in the path name must exist. New directories are not created. If the stream file does not exist, it will be created.
|
||
|
</p>
|
||
|
<p>
|
||
|
<b>Note: </b>The QSYS.LIB file system does not allow attributes to be set, so if the path name specified on the TOSTMF parameter is a QSYS member, diagnostic messages will appear in the joblog. The diagnostic messages will not prevent the copy operation from completing successfully.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>path-name</i></b></dt>
|
||
|
<dd>Specify the path name of the output stream file to which data is to be copied.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.MBROPT"></a>
|
||
|
<h3>Replace or add records (MBROPT)</h3>
|
||
|
<p>Specifies whether the copy operation replaces, adds, or fails to copy to the records in the to-file member if a member with the specified name already exists. If the member does not exist, it is created and added to the to-file.
|
||
|
</p>
|
||
|
<p>
|
||
|
<b>Note: </b>If *ADD is specified and the to-file contains no records, the copy operation completes normally. If *REPLACE is specified and the to-file contains no records, the copy operation ends abnormally.
|
||
|
</p>
|
||
|
<p>Additional information is available in the Files and file systems topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*ADD</u></b></dt>
|
||
|
<dd>The copied records are added to the end of the existing member records.
|
||
|
</dd>
|
||
|
<dt><b>*REPLACE</b></dt>
|
||
|
<dd>The copied records replace the existing member records.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.FROMCCSID"></a>
|
||
|
<h3>From CCSID (FROMCCSID)</h3>
|
||
|
<p>Specifies the coded character set identifier (CCSID) to use for the from-file fields.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FILE</u></b></dt>
|
||
|
<dd>The data is converted from the from-file field CCSID. If the CCSID of the from-file field is 65535, the field is not converted and it is treated as binary data.
|
||
|
</dd>
|
||
|
<dt><b><i>1-65533</i></b></dt>
|
||
|
<dd>Specify the CCSID to be used when the CCSID of the from-file field is 65535. If the CCSID of the from-file field is not 65535, this parameter is ignored.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.TOCCSID"></a>
|
||
|
<h3>To CCSID (TOCCSID)</h3>
|
||
|
<p>Specifies the coded character set identifier (CCSID) to use for the file specified for the <b>To data base file (TOFILE)</b> parameter.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FILE</u></b></dt>
|
||
|
<dd>The CCSID of the to-file database file is used.
|
||
|
</dd>
|
||
|
<dt><b><i>1-65533</i></b></dt>
|
||
|
<dd>Specify the CCSID to be used when the CCSID of the to-file is 65535. If the to-file CCSID is not 65535, an error message will be sent.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.STMFCODPAG"></a>
|
||
|
<h3>Stream file code page (STMFCODPAG)</h3>
|
||
|
<p>Specifies the method of obtaining the stream file code page and the coded character set identifier (CCSID) equivalent of the code page that is used for data conversion.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*STMF</u></b></dt>
|
||
|
<dd>If the stream file exists, and data conversion is requested, the CCSID equivalent of the code page associated with the stream file is used to perform the conversion.
|
||
|
<p>If the stream file does not exist, the code page equivalent of the source database file CCSID is used and associated with the stream file.
|
||
|
</p>
|
||
|
</dd>
|
||
|
<dt><b>*STDASCII</b></dt>
|
||
|
<dd>If the stream file exists, this option is valid only if the code page associated with the stream file is the same as the specified value. Otherwise, the operation will fail.
|
||
|
<p>If the stream file does not exist, a code page in the IBM PC Data encoding scheme (x2100) is computed. This code page is associated with the target stream file and is used for data conversion if it is requested.
|
||
|
</p>
|
||
|
</dd>
|
||
|
<dt><b>*PCASCII</b></dt>
|
||
|
<dd>If the stream file exists, this option is valid only if the code page associated with the stream file is the same as the specified value. Otherwise, the operation will fail.
|
||
|
<p>If the stream file does not exist, a code page in the Microsoft Windows encoding scheme (x4105) is computed. (Microsoft and Windows are registered trademarks of Microsoft Corporation). This code page is associated with the target stream file and is used for data conversion if it is requested. This option allows the resulting data to be used by Microsoft Windows applications.
|
||
|
</p>
|
||
|
</dd>
|
||
|
<dt><b><i>1-32767</i></b></dt>
|
||
|
<dd>Specify the code page to be used. If the stream file exists, this option is only valid if the code page associated with the stream file is the same as the specified value. Otherwise, an error message is sent. If the stream file does not exist, the specified code page is associated with the stream file when it is created.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.RCDDLM"></a>
|
||
|
<h3>Record delimiter (RCDDLM)</h3>
|
||
|
<p>Specifies the record delimiter of the to-file.
|
||
|
</p>
|
||
|
<p>If the TOFILE parameter is specified, valid values are *EOR or a character value. If the TOSTMF parameter is specified, valid values are *CR, *CRLF, *LF, *LFCR or *ALL.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*EOR</u></b></dt>
|
||
|
<dd>End of record and the data after the last field will be padded with X'00'.
|
||
|
</dd>
|
||
|
<dt><b>*CRLF</b></dt>
|
||
|
<dd>Carriage-return followed by line-feed is appended to the end of the line.
|
||
|
</dd>
|
||
|
<dt><b>*LF</b></dt>
|
||
|
<dd>Line-feed is appended to the end of the line.
|
||
|
</dd>
|
||
|
<dt><b>*CR</b></dt>
|
||
|
<dd>Carriage-return is appended to the end of the line.
|
||
|
</dd>
|
||
|
<dt><b>*LFCR</b></dt>
|
||
|
<dd>Line-feed followed by carriage-return is appended to the end of the line.
|
||
|
</dd>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the single character which indicates the end of a single record.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.DTAFMT"></a>
|
||
|
<h3>Record format of import file (DTAFMT)</h3>
|
||
|
<p>Specifies the format of the data of the generated to-file.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*DLM</u></b></dt>
|
||
|
<dd>The data contains delimiter characters. Refer to parameter descriptions for STRDLM, FLDDLM, and RCDDLM for information on string, field, and record delimiter characters.
|
||
|
</dd>
|
||
|
<dt><b>*FIXED</b></dt>
|
||
|
<dd>The data format is fixed. The data is in fixed columns in each record. Refer to the <b>Null field indicator (NULLIND)</b> parameter for more information on how null fields will appear in the to-file.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.STRDLM"></a>
|
||
|
<h3>String delimiter (STRDLM)</h3>
|
||
|
<p>Specifies the string delimiter for the data of the fields being copied to. This character indicates the start and end of character, date, time, and timestamp strings in the to-file. Depending on the utility used to create the to-file, some types of strings may appear in the to-file without string delimiter characters.
|
||
|
</p>
|
||
|
<p>The specified delimiter character will be converted from the coded character set identifier (CCSID) of the job to the CCSID of the to-file. If the to-file CCSID is 1200, 1208, or 13488 the delimiter is converted to the job CCSID, or to the job's default CCSID when the job CCSID is 65535.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*DBLQUOTE</u></b></dt>
|
||
|
<dd>The double quote character is used as the string delimiter.
|
||
|
</dd>
|
||
|
<dt><b>*NONE</b></dt>
|
||
|
<dd>No delimiter is expected as the string delimiter. The blank character ( ) represents the *NONE value.
|
||
|
</dd>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the character value for the string delimiter.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.STRESCCHR"></a>
|
||
|
<h3>String escape character (STRESCCHR)</h3>
|
||
|
<p>Specifies the escape character to be generated within string fields in the to-file. Character fields in the to-file may contain characters that have a special meaning to the import utility. These characters include the string delimiter and the string escape character itself.
|
||
|
</p>
|
||
|
<p>The string escape character precedes such characters in the to-file data and revokes their special meaning. The import utility can then determine if the character is data or a string delimiter.
|
||
|
</p>
|
||
|
<p>The specified string escape character will be converted from the coded character set identifier (CCSID) of the job to the CCSID of the to-file. If the to-file CCSID is 1200, 1208, or 13488 the string escape character is converted to the job CCSID, or the job's default CCSID when the job CCSID is 65535.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*STRDLM</u></b></dt>
|
||
|
<dd>The string delimiter is used as the escape character. Each string delimiter in a from-file character field is exported as two adjacent string delimiters.
|
||
|
</dd>
|
||
|
<dt><b>*NONE</b></dt>
|
||
|
<dd>No string escape character is inserted in the data. If the string delimiter character is present in the data, unexpected results could occur in the import utility that relies on the to-file.
|
||
|
</dd>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the character to be used as the escape character.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.RMVBLANK"></a>
|
||
|
<h3>Remove blanks (RMVBLANK)</h3>
|
||
|
<p>Specifies whether blanks are removed or retained. This parameter is ignored when the DTAFMT parameter is set to *FIXED.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NONE</u></b></dt>
|
||
|
<dd>All leading and trailing blanks are retained.
|
||
|
</dd>
|
||
|
<dt><b>*LEADING</b></dt>
|
||
|
<dd>Leading blanks are removed.
|
||
|
</dd>
|
||
|
<dt><b>*TRAILING</b></dt>
|
||
|
<dd>Trailing blanks are removed.
|
||
|
</dd>
|
||
|
<dt><b>*BOTH</b></dt>
|
||
|
<dd>Leading and trailing blanks are removed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.FLDDLM"></a>
|
||
|
<h3>Field delimiter (FLDDLM)</h3>
|
||
|
<p>Specifies the field delimiter for the record. This value is placed between fields.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>','</u></b></dt>
|
||
|
<dd>A comma is used as the field delimiter.
|
||
|
</dd>
|
||
|
<dt><b>*TAB</b></dt>
|
||
|
<dd>The horizontal tab character is used as field delimiter.
|
||
|
</dd>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the character value for the field delimiter.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.NULLIND"></a>
|
||
|
<h3>Null field indicator (NULLIND)</h3>
|
||
|
<p>Specifies whether the first character following each field will contain either a <b>Y</b> or <b>N</b> indicating if the field is null. NULLIND(*YES) is only valid if *FIXED is specified for the <b>Record format of import file (DTAFMT)</b> parameter.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NO</u></b></dt>
|
||
|
<dd>Do not add the null value indicator character after each field.
|
||
|
</dd>
|
||
|
<dt><b>*YES</b></dt>
|
||
|
<dd>Add the null value indicator character after each field in the generated fixed-format to-file.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.DECPNT"></a>
|
||
|
<h3>Decimal point (DECPNT)</h3>
|
||
|
<p>Specifies the decimal point character to be used when copying numeric data to the to-file.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*PERIOD</u></b></dt>
|
||
|
<dd>A period (.) is used for the decimal point character.
|
||
|
</dd>
|
||
|
<dt><b>*COMMA</b></dt>
|
||
|
<dd>A comma (,) is used for the decimal point character.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.DATFMT"></a>
|
||
|
<h3>Date format (DATFMT)</h3>
|
||
|
<p>Specifies the date format to be used when copying date fields to the to-file.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*ISO</u></b></dt>
|
||
|
<dd>The International Organization for Standardization (ISO) date format <b>yyyy-mm-dd</b> is used.
|
||
|
</dd>
|
||
|
<dt><b>*USA</b></dt>
|
||
|
<dd>The United States date format <b>mm/dd/yyyy</b> is used.
|
||
|
</dd>
|
||
|
<dt><b>*EUR</b></dt>
|
||
|
<dd>The European date format <b>dd.mm.yyyy</b> is used.
|
||
|
</dd>
|
||
|
<dt><b>*JIS</b></dt>
|
||
|
<dd>The Japanese Industrial Standard date format <b>yyyy-mm-dd</b> is used.
|
||
|
</dd>
|
||
|
<dt><b>*YYMD</b></dt>
|
||
|
<dd>The date format <b>yyyymmdd</b> is used.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CPYTOIMPF.TIMFMT"></a>
|
||
|
<h3>Time format (TIMFMT)</h3>
|
||
|
<p>Specifies the time format to be used when copying time fields to the to-file.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*ISO</u></b></dt>
|
||
|
<dd>The International Organization for Standardization (ISO) time format <b>hh.mm.ss</b> is used.
|
||
|
</dd>
|
||
|
<dt><b>*USA</b></dt>
|
||
|
<dd>The United States time format <b>hh:mmxx</b> is used, where <b>xx</b> is AM or PM.
|
||
|
</dd>
|
||
|
<dt><b>*EUR</b></dt>
|
||
|
<dd>The European time format <b>hh.mm.ss</b> is used.
|
||
|
</dd>
|
||
|
<dt><b>*JIS</b></dt>
|
||
|
<dd>The Japanese Industrial Standard time format <b>hh:mm:ss</b> is used.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CPYTOIMPF.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CPYTOIMPF FROMFILE(DB2FILE) TOFILE(EXPFILE)
|
||
|
FLDDLM(';') RCDDLM(X'07')
|
||
|
STRDLM(*DBLQUOTE) DATFMT(*JIS) TIMFMT(*JIS)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>All records of externally described file DB2FILE will be copied to import file EXPFILE. Fields in the import file will be delimited by semi-colon (;) characters. Each record in the import file will be delimited by a hexadecimal '07' character. Character, date, time, and timestamp values will begin and end with the double quote character. Date and time fields will be in the *JIS format.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CPYTOIMPF.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPF2817</b></dt>
|
||
|
<dd>Copy command ended because of error.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CPYTOIMPF.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|