251 lines
8.5 KiB
HTML
251 lines
8.5 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 Document (CPYDOC)</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="CPYDOC.Top_Of_Page"></a>
|
|
<h2>Copy Document (CPYDOC)</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="#CPYDOC.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#CPYDOC.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#CPYDOC.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="CPYDOC"></a>
|
|
<p>The Copy Document (CPYDOC) command allows you to copy a document from one folder into another folder or to copy a document that is not in a folder into a folder.
|
|
</p>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ul>
|
|
<li>If you are replacing a document in a folder, you must have change (*CHANGE) authority to that document.
|
|
</li>
|
|
<li>If you are creating a new document in a folder, you must have *CHANGE authority to that folder. The new document will have the same authorization as the document from which it is copied.
|
|
</li>
|
|
<li>You must have use (*USE) authority to the document being copied.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="CPYDOC.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"><a href="#CPYDOC.FROMDOC"><b>FROMDOC</b></a></td>
|
|
<td valign="top">From document</td>
|
|
<td valign="top"><i>Character value</i>, *SYSOBJNAM</td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CPYDOC.FROMFLR"><b>FROMFLR</b></a></td>
|
|
<td valign="top">From folder</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
|
|
<td valign="top">Optional, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CPYDOC.TODOC"><b>TODOC</b></a></td>
|
|
<td valign="top">To document</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*FROMDOC</u></b></td>
|
|
<td valign="top">Optional, Positional 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CPYDOC.TOFLR"><b>TOFLR</b></a></td>
|
|
<td valign="top">To folder</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*FROMFLR</u></b></td>
|
|
<td valign="top">Optional, Positional 4</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CPYDOC.REPLACE"><b>REPLACE</b></a></td>
|
|
<td valign="top">Replace document</td>
|
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CPYDOC.SYSOBJNAM"><b>SYSOBJNAM</b></a></td>
|
|
<td valign="top">System object name</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="CPYDOC.FROMDOC"></a>
|
|
<h3>From document (FROMDOC)</h3>
|
|
<p>Specifies the name of the document being copied.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the document that is copied.
|
|
<p>If FROMDOC(name) is specified, a folder name must be specified on FROMFLR.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*SYSOBJNAM</b></dt>
|
|
<dd>A system object name is used to identify the document that is copied.
|
|
<p>If FROMDOC(*SYSOBJNAM) is specified, then SYSOBJNAM(name), TODOC(name) and TOFLR(name) must be specified.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CPYDOC.FROMFLR"></a>
|
|
<h3>From folder (FROMFLR)</h3>
|
|
<p>Specifies the name of the folder that contains the document that is copied.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>A folder name is not specified for the document. FROMFLR(*NONE) must be specified if the document is not in a folder. FROMFLR(*NONE) cannot be specified if FROMDOC(name) is specified.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the folder that contains the document that is copied.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CPYDOC.TODOC"></a>
|
|
<h3>To document (TODOC)</h3>
|
|
<p>Specifies the output document name.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*FROMDOC</u></b></dt>
|
|
<dd>The output document name is the same as that specified on the <b>From document (FROMDOC)</b> parameter.
|
|
<p>If TODOC(*FROMDOC) is specified, then TOFLR(*FROMFLR) cannot be specified.
|
|
</p>
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the output document name.
|
|
<p>If FROMDOC(*SYSOBJNAME) is specified, then TODOC(name) must be specified.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CPYDOC.TOFLR"></a>
|
|
<h3>To folder (TOFLR)</h3>
|
|
<p>Specifies the folder into which the output document is copied.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*FROMFLR</u></b></dt>
|
|
<dd>The folder name is the same as that specified on the <b>From folder (FROMFLR)</b> parameter; the document is copied into the same folder.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the folder into which the document is copied.
|
|
<p>If FROMDOC(*SYSOBJNAME) is specified, then TOFLR(name) must be specified.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CPYDOC.REPLACE"></a>
|
|
<h3>Replace document (REPLACE)</h3>
|
|
<p>Specifies whether the document specified on TODOC can be replaced.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NO</u></b></dt>
|
|
<dd>The output document is a new document created within the folder specified on the <b>To folder (TOFLR)</b> parameter. If a document with the same name already exists in the folder, no copy is made.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>The output document replaces an existing document with the same name in the folder specified on the TOFLR parameter. If no document with the same name exists in the folder, a new document is created.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CPYDOC.SYSOBJNAM"></a>
|
|
<h3>System object name (SYSOBJNAM)</h3>
|
|
<p>Specifies the system object name. This parameter is valid only when DLO(*SYSOBJNAM) is specified.
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the system object name of the document that is copied. A full ten characters must be specified.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CPYDOC.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Copying a Document</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CPYDOC FROMDOC(MYDOC) FROMFLR(MYFLR)
|
|
TODOC(MYDOC2) TOFLR(MYFLR2)
|
|
REPLACE(*YES)
|
|
</pre>
|
|
</p>
|
|
<p>This command copies document MYDOC located in folder MYFLR to document MYDOC2 located in folder MYFLR2. If document MYDOC2 already exists in MYFLR2, the system replaces it with a copy of document MYDOC; otherwise, MYDOC2 is created in MYFLR2 as a copy of MYDOC in MYFLR.
|
|
</p>
|
|
<p><b>Example 2: Copying Document and Keeping Source Document Name</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CPYDOC FROMDOC(*SYSOBJNAM) SYSOBJNAM(AMBT133080)
|
|
TODOC(MYDOC4) TOFLR(MYFLR)
|
|
</pre>
|
|
</p>
|
|
<p>This command copies a document, identified by the system object name, to document MYDOC4 located in folder MYFLR. The document name will be the same as the name of the source document.
|
|
</p>
|
|
<p><b>Example 3: Copying Document to Document in Same Folder</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CPYDOC FROMDOC(XYZ) FROMFLR('MYFLR/TEST') TODOC(NEW)
|
|
</pre>
|
|
</p>
|
|
<p>This command copies document XYZ located in folder MYFLR/TEST to document NEW in the same folder. If document NEW already exists, an error message is sent.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CPYDOC.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPF8A12</b></dt>
|
|
<dd>Document &2 in folder &1 not copied.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CPYDOC.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|