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

80 lines
8.0 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="concept" />
<meta name="DC.Title" content="Copy files: basic functions" />
<meta name="abstract" content="You can copy from a physical or logical database file, open query file, diskette file, tape file, or inline data file. The to-file can be a physical database file, diskette file, tape file, program-described printer file, or *PRINT." />
<meta name="description" content="You can copy from a physical or logical database file, open query file, diskette file, tape file, or inline data file. The to-file can be a physical database file, diskette file, tape file, program-described printer file, or *PRINT." />
<meta name="DC.subject" content="Copy Source File (CPYSRCF) command, specifying TOFILE(*PRINT), command, CL, CPYSRCF (Copy Source File), CPYSRCF (Copy Source File) command, Copy Source File (CPYSRCF), source file, copying" />
<meta name="keywords" content="Copy Source File (CPYSRCF) command, specifying TOFILE(*PRINT), command, CL, CPYSRCF (Copy Source File), CPYSRCF (Copy Source File) command, Copy Source File (CPYSRCF), source file, copying" />
<meta name="DC.Relation" scheme="URI" content="rbal3copyfileover.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3fityp.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3recsq.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3rcfcm.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3mcper.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3mzrff.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3tofil.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3cpyfr.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3sup.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3nul.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3bcfuc" />
<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 files: basic functions</title>
</head>
<body id="rbal3bcfuc"><a name="rbal3bcfuc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Copy files: basic functions</h1>
<div><p>You can copy from a physical or logical database file, open query file, diskette file, tape file, or inline data file. The to-file can be a physical database file, diskette file, tape file, program-described printer file, or *PRINT. </p>
<p>When you specify TOFILE(*PRINT), the <a href="../cl/cpysrcf.htm">CPYSRCF</a> command uses a different format from the other copy commands. This format shows source information in a more readable format, and for multiple member copies, the members are copied and listed in alphabetical order.</p>
<p>If you are copying from a database file and the to-file does not exist, you must specify CRTFILE(*YES) and identify the file name and library name on the TOFILE parameter in order to create the to-file. You cannot copy from a diskette to a diskette unless the to-file is spooled and a diskette spooling writer is not active.</p>
<p>The from-file (not including the <a href="../cl/cpyfrmqryf.htm">CPYFRMQRYF</a> command where the from-file is not opened), to-file, and the QSYSPRT printer file (if TOFILE(*PRINT), PRINT(*COPIED), PRINT(*EXCLD), or PRINT(*ERROR) is specified) are opened with the SHARE(*NO) attribute. Because the copy might not function correctly with a shared file, it will end with an error message if the from-file, to-file, or QSYSPRT printer file is overridden to SHARE(*YES) and the file has already been opened in the job.</p>
<p>If you specify TOFILE(*PRINT), the records are copied to the IBM-supplied printer file QSYSPRT, and the OUTFMT parameter formats the list.</p>
<p>If you do not want a formatted list or if you want to use first-character forms control (CTLCHAR(*FCFC) on the <a href="../cl/crtprtf.htm">Create Printer File (CRTPRTF)</a> or <a href="../cl/ovrprtf.htm">Override with Printer File (OVRPRTF)</a> command), you should specify a program-described printer file name (such as QSYSPRT) instead of *PRINT on the TOFILE parameter.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbal3fityp.htm">File types and copying</a></strong><br />
There are considerations when you copy files of one type to files of another type.</li>
<li class="ulchildlink"><strong><a href="rbal3recsq.htm">Record sequence and copying</a></strong><br />
The <dfn class="term">access path</dfn> is the sequence in which records are
organized in a database file. There are two types of access paths: <dfn class="term">keyed
sequence</dfn> and <dfn class="term">arrival sequence</dfn>. With the copy function,
you can process records in a database file in either arrival sequence or keyed
sequence.</li>
<li class="ulchildlink"><strong><a href="rbal3rcfcm.htm">Resending copy file completion message</a></strong><br />
If you run a COPY command from a CL program, the completion message indicating the number of records that are copied is not sent directly to the system operator. You can direct this message to the system operator by resending it.</li>
<li class="ulchildlink"><strong><a href="rbal3mcper.htm">Monitoring for copy errors</a></strong><br />
When an error occurs, the escape message CPF2817 is sent to indicate many different error conditions.</li>
<li class="ulchildlink"><strong><a href="rbal3mzrff.htm">Monitoring for zero records in the from-file</a></strong><br />
There are some special considerations for copy when the from-file is a physical or logical file and one or more members to be copied are empty.</li>
<li class="ulchildlink"><strong><a href="rbal3tofil.htm">Creating a duplicate to-file member</a></strong><br />
You can create duplicates to-file members without doing the copy file action again.</li>
<li class="ulchildlink"><strong><a href="rbal3cpyfr.htm">CPYFRMQRYF command support for CCSIDs</a></strong><br />
The Copy from Query File (CPYFRMQRYF) command provides coded character set identifier (CCSID) conversions for character and double-byte character sets (DBCS) fields.</li>
<li class="ulchildlink"><strong><a href="rbal3sup.htm">CPYSRCF command support for CCSIDs</a></strong><br />
Using the Copy Source File (CPYSRCF) command automatically converts data in the from-file to the to-file CCSID. If you do not want the character data converted, use the CPYF command with FMTOPT(*NOCHK).</li>
<li class="ulchildlink"><strong><a href="rbal3nul.htm">Copy commands support for null values</a></strong><br />
You can copy files that contain null-capable fields by using the CPYF and CPYFRMQRYF commands. The FMTOPT parameter allows mapping of null-capable fields.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <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>
</div>
</body>
</html>