ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzam4_5.4.0.1/rzam4exmplcpyopt.htm

71 lines
4.9 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="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="Examples: CPYOPT command" />
<meta name="abstract" content="Below are two scenarios using the CPYOPT command: Copy all files from the source volume and copy all files form the source volume since the last copy request." />
<meta name="description" content="Below are two scenarios using the CPYOPT command: Copy all files from the source volume and copy all files form the source volume since the last copy request." />
<meta name="DC.Relation" scheme="URI" content="rzam4strtdatetime.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzam4exmplcpyopt" />
<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>Examples: CPYOPT command</title>
</head>
<body id="rzam4exmplcpyopt"><a name="rzam4exmplcpyopt"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Examples: CPYOPT command</h1>
<div><p>Below are two scenarios using the CPYOPT command: Copy all files
from the source volume and copy all files form the source volume since the
last copy request.</p>
<p><strong>Scenario 1 — Copy all files from the source volume:</strong> This example
shows how to copy all files from the source volume VOL001 to a volume which
currently does not contain any files or directories. The system will process
all subdirectories of the source volume, create the subdirectories on the
target volume, and copy all files.</p>
<pre> &gt; CPYOPT FROMVOL(VOL001) FROMPATH(/) TOVOL(CPYVOL001) SLTFILE(*ALL) CPYSUBDIR(*YES) CRTDIR(*YES) </pre>
<p><strong>Scenario 2 — Copy all files form the source volume since the last copy
request:</strong> For this example you have several different options
which may take different lengths of time. Your first option would be to issue
the same request as Scenario 1 but with a different target volume. The system
will copy all the files and directories to the new target volume. </p>
<p>Your second option would be to use the *CHANGED option on the SLTFILE parameter. </p>
<pre>&gt; CPYOPT FROMVOL(VOL001) FROMPATH(/) TOVOL(CPYVOL001) SLTFILE(*CHANGED) CPYSUBDIR(*YES) CRTDIR(*YES) </pre>
<p>Depending on how many files are currently on the source and target media
this request may take a long time to process. First, you must obtain a list
of all files on the source media and the target media. Then compare the files
in order to determine if any file has changed since the last CPYOPT request.
Once that is done, the system will copy only the files that have changed. </p>
<p>The third option is using the *NEW option on the SLTFILE parameter, provided
that no existing files changed, but simply added to the source volume.</p>
<pre> &gt; CPYOPT FROMVOL(VOL001) FROMPATH(/) TOVOL(CPYVOL001) SLTFILE(*NEW) CPYSUBDIR(*YES) CRTDIR(*YES) </pre>
<p>First, you must build option a list of all files that are on both the source
and the target volume. Then compare the files before copying any new files.
Your fourth option would be to use one of the SLTFILE options in combination
with specifying a starting date and time.</p>
<p>Your fourth option would be to use one of the SLTFILE options in combination
with specifying a starting date and time.</p>
<pre>&gt; CPYOPT FROMVOL(VOL001) FROMPATH(/) TOVOL(CPYVOL001) SLTFILE(*CHANGED) CPYSUBDIR(*YES) CRTDIR(*YES) FROMTIME(04/01/99 00:00:00)</pre>
<p> By specifying a starting time, the system copies only files that were
created or changed after 04/01/99 to the target volume.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzam4strtdatetime.htm" title="The system will use the FROMTIME parameter to determine if a file is eligible for copying based on its creation or modification date.">Starting date and time</a></div>
</div>
</div>
</body>
</html>