ibm-information-center/dist/eclipse/plugins/i5OS.ic.nls_5.4.0.1/rbagscopyingfiles.htm

148 lines
7.3 KiB
HTML
Raw Permalink 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="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="Copy spooled and nonspooled DBCS files" />
<meta name="abstract" content="You can copy both spooled and nonspooled DBCS files." />
<meta name="description" content="You can copy both spooled and nonspooled DBCS files." />
<meta name="DC.Relation" scheme="URI" content="rbagsdesigndbcsapps.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/cpysplf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/cpyf.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbagscopyingfiles" />
<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>Copy spooled and nonspooled DBCS files</title>
</head>
<body id="rbagscopyingfiles"><a name="rbagscopyingfiles"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Copy spooled and nonspooled DBCS files</h1>
<div><p>You can copy both spooled and nonspooled DBCS files.</p>
<div class="section"><h4 class="sectiontitle">Copy spooled files</h4><p>Copy spooled files that have
double-byte data by using the Copy Spooled File (CPYSPLF) command. However,
the database file to which the file is being copied must have been created
with the IGCDTA(*YES) value specified.</p>
<p>When copying spooled files to
a database file that contains double-byte data, an extra column is reserved
for the shift-out character. This shift-out character is placed between the
control information for the record and the user data. The following table
shows the shift-out character column number, based on the value specified
for the Control character (CTLCHAR) keyword:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" id="d0e28">CTLCHAR value</th>
<th valign="top" id="d0e30">Column for shift-out character</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e28 ">*NONE</td>
<td valign="top" headers="d0e30 ">1</td>
</tr>
<tr><td valign="top" headers="d0e28 ">*FCFC</td>
<td valign="top" headers="d0e30 ">2</td>
</tr>
<tr><td valign="top" headers="d0e28 ">*PRTCTL</td>
<td valign="top" headers="d0e30 ">5</td>
</tr>
<tr><td valign="top" headers="d0e28 ">*S36FMT</td>
<td valign="top" headers="d0e30 ">10</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Copy nonspooled DBCS files</h4><p>You can use the Copy
File (CPYF) command to copy double-byte data from one file to another.</p>
<p>When you copy data from a double-byte database
file to an alphanumeric database file, specify one of the following parameters
on the CPYF command:</p>
<ul><li>If both files are source files or if both files are database files, you
can specify either the FMTOPT(*MAP) parameter or the FMTOPT(*NOCHK) parameter.</li>
<li>If one file is a source file and the other file is a database file, specify
the FMT(*CVTSRC) parameter.</li>
</ul>
<p>When you copy DBCS files to alphanumeric files, the system sends you
an informational message describing the difference in file types.</p>
<p>Either
the FMTOPT(*MAP) or FMTOPT(*NOCHK) option of the copy file function must be
specified for copies from a physical or logical file to a physical file when
there are fields with the same name in the from-file and to-file, but the
data type for fields is as shown in the following table:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th valign="top" id="d0e75">From-file field data type</th>
<th valign="top" id="d0e77">To-file field data type</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e75 ">A (character)</td>
<td valign="top" headers="d0e77 ">J (DBCS-only)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">O (DBCS-open)</td>
<td valign="top" headers="d0e77 ">J (DBCS-only)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">O (DBCS-open)</td>
<td valign="top" headers="d0e77 ">E (DBCS-either)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">E (DBCS-either)</td>
<td valign="top" headers="d0e77 ">J (DBCS-only)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">J (DBCS-only)</td>
<td valign="top" headers="d0e77 ">G (DBCS-graphic)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">O (DBCS-open)</td>
<td valign="top" headers="d0e77 ">G (DBCS-graphic)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">E (DBCS-either)</td>
<td valign="top" headers="d0e77 ">G (DBCS-graphic)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">G (DBCS-graphic)</td>
<td valign="top" headers="d0e77 ">J (DBCS-only)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">G (DBCS-graphic)</td>
<td valign="top" headers="d0e77 ">O (DBCS-open)</td>
</tr>
<tr><td valign="top" headers="d0e75 ">G (DBCS-graphic)</td>
<td valign="top" headers="d0e77 ">E (DBCS-either)</td>
</tr>
</tbody>
</table>
</div>
<p>When you use FMTOPT(*MAP) on the CPYF command to copy data to a
DBCS-only field or DBCS-graphic field, the corresponding field in the from-file
must not be:</p>
<ul><li>Less than a 2-byte character field</li>
<li>An odd-byte-length character field</li>
<li>An odd-byte-length DBCS-open field</li>
</ul>
<p>If you attempt to copy with one of these specified in the from-field,
an error message is sent.</p>
<p>When you copy double-byte data from one database
file to another with the FMTOPT(*MAP) parameter specified, double-byte data
is copied correctly. The system performs correct padding and truncation of
double-byte data to ensure data integrity.</p>
<p>When using the CPYF command
with FMTOPT(*MAP) to copy a DBCS-open field to a graphic field, a conversion
error occurs if the DBCS-open field contains any SBCS data (including blanks).</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbagsdesigndbcsapps.htm" title="Design your application programs for processing double-byte data in the same way you design application programs for processing alphanumeric data.">Develop applications that process DBCS data</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../cl/cpysplf.htm">Copy Spooled File (CPYSPLF) command</a></div>
<div><a href="../cl/cpyf.htm">Copy File (CPYF) command</a></div>
</div>
</div>
</body>
</html>