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

99 lines
7.3 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="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="Copy physical or logical files" />
<meta name="abstract" content="To copy a physical or logical file (the from-file) on iSeries into another physical file (the to-file), which does not yet exist, you can use the CPYF command." />
<meta name="description" content="To copy a physical or logical file (the from-file) on iSeries into another physical file (the to-file), which does not yet exist, you can use the CPYF command." />
<meta name="DC.Relation" scheme="URI" content="rbal3copyfile.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/cpyf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/cpyfrmqryf.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3copyfileover.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3copyto.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3selmem.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3records.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3selrecords.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3copypflf" />
<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 physical or logical files</title>
</head>
<body id="rbal3copypflf"><a name="rbal3copypflf"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Copy physical or logical files</h1>
<div><p>To copy a physical or logical file (the <em>from-file</em>) on <span class="keyword">iSeries™</span> into another physical file (the <em>to-file</em>),
which does not yet exist, you can use the CPYF command.</p>
<div class="p">Below is an example:<pre> CPYF FROMFILE(PERSONNEL/PAYROLL)
TOFILE(TESTPAY/PAYROLL) MBROPT(*ADD)
CRTFILE(*YES) ERRLVL(10) </pre>
</div>
<div class="section"><h4 class="sectiontitle">Full-service copy support</h4><p>A variety of copy commands
that are modified by numerous parameters gives you a great deal of flexibility
in the way you copy your data. For instance, you typically can copy your data
into existing files (or to-files). As shown in the example above, you can
use the CRTFILE parameter on the <a href="../cl/cpyf.htm">CPYF</a> or <a href="../cl/cpyfrmqryf.htm">CPYFRMQRYF</a> commands to create the to-file during the
copy operation. See <a href="rbal3copyto.htm#rbal3copyto">Create the to-file (CRTFILE parameter)</a> for
details.</p>
<p>See <a href="rbal3copyfileover.htm#rbal3copyfileover">Copy files: overview</a> to
learn about the basic functions relating to the <span class="keyword">iSeries</span> copy
commands.</p>
</div>
<div class="section"><h4 class="sectiontitle">Copy only the information you need</h4><div class="p">The copy function
lets you specify selected records and members of your files: <ul><li><a href="rbal3records.htm#rbal3records">Add, replace, and update records (MBROPT parameter)</a></li>
<li><a href="rbal3selmem.htm#rbal3selmem">Select members to copy</a></li>
<li><a href="rbal3selrecords.htm#rbal3selrecords">Select the records to copy</a></li>
</ul>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Copy across different formats and servers</h4><ul><li><a href="rbal3copydbmbrfmt.htm#rbal3copydbmbrfmt">Copying between different database record formats (FMTOPT parameter)</a>. You can
copy from a source file to a data file or from a data file to a source file.
If the from-file or to-file is a device file, this function is automatic.
If both files are database files, you must specify FMTOPT(CVTSRC). If either
file is a device file or inline data file, the FMTOPT parameter does not apply.</li>
<li><a href="rbal3copyserver.htm#rbal3copyserver">Copy between different servers</a>. This is especially
important for when you are using Data Warehousing, and when you want to use
existing export products from other platforms to move data to the <span class="keyword">iSeries</span> server.</li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Make the copy function work for your particular needs </h4><div class="p">You
can accomplish a wide variety of tasks with careful use of the options that
are available to you through the copy function. <ul><li><a href="rbal3prtrecords.htm#rbal3prtrecords">Print records (PRINT, OUTFMT, and TOFILE(*PRINT) parameters)</a></li>
<li><a href="rbal3sequence.htm#rbal3sequence">Add or changing source file sequence number and date fields (SRCOPT and SRCSEQ Parameters)</a></li>
<li><a href="rbal3preerr.htm#rbal3preerr">Prevent errors when copying files</a></li>
<li><a href="rbal3performance.htm#rbal3performance">Performance</a></li>
</ul>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3copyfile.htm" title="The copy function on iSeries can copy physical and logical files, copy members and records, copy complex objects, and copy files between servers.">Copy files</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbal3copyfileover.htm" title="You can use the copy function to move data between device files, between database files (including distributed DB2 Multisystem files), or between device and database files.">Copy files: overview</a></div>
<div><a href="rbal3copyto.htm" title="To copy a physical or logical file when no to-file exists to receive the data, you can create the to-file by specifying CRTFILE(*YES).">Create the to-file (CRTFILE parameter)</a></div>
<div><a href="rbal3selmem.htm" title="iSeries gives you several options for copying file members.">Select members to copy</a></div>
<div><a href="rbal3records.htm" title="Many iSeries copy commands allows you to add or replace existing data in the to-file specifying different attributes on the MBROPT paramete.">Add, replace, and update records (MBROPT parameter)</a></div>
<div><a href="rbal3selrecords.htm" title="You can use parameters on the copy commands to select only the specific records that you want to copy.">Select the records to copy</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/cpyf.htm">CPYF command</a></div>
<div><a href="../cl/cpyfrmqryf.htm">CPYFRMQRYF command</a></div>
</div>
</div>
</body>
</html>