389 lines
19 KiB
HTML
389 lines
19 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>Move Object (MOVE)</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="MOVE.Top_Of_Page"></a>
|
|
<h2>Move Object (MOVE)</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="#MOVE.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#MOVE.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#MOVE.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="MOVE"></a>
|
|
<p>The Move Object (MOVE) command moves an object from the directory it is in to a different directory.
|
|
</p>
|
|
<p>If the <b>To directory (TODIR)</b> parameter is used, the object is moved to another directory and the object keeps the same name. If the <b>To object (TOOBJ)</b> parameter is used the object is also renamed.
|
|
</p>
|
|
<p>If the original object is a read-only file (a file that has the PC read-only attribute flag turned on), the move command operates as follows:
|
|
</p>
|
|
<ol>
|
|
<li>If the original file can be deleted (that is, the read-only bit can be turned off for the file), the move will succeed, retaining the read-only attribute of the file.
|
|
</li>
|
|
<li>If the original file cannot be deleted, (for example, a CD-ROM file), the move operation will fail and a message will be issued indicating that the source is read-only.
|
|
</li>
|
|
</ol>
|
|
<p>When moving a file within a file system, the Last access date/time, the Data change date/time and the Attribute change date/time are preserved in the new file. If the file is moved outside of the original file system to the "root" (/), QOpenSys, QDLS, or UDFS file systems, the Attribute change date/time is changed to the current time. In the case of moving to a database file member (*MBR) in the QSYS.LIB or independent ASP QSYS.LIB file system, the Data change date/time is updated as well.
|
|
</p>
|
|
<p>This command is an alias for the Move Object (MOV) command and can also be issued using the following alternative command name:
|
|
</p>
|
|
<ul>
|
|
<li>MOV
|
|
</li>
|
|
</ul>
|
|
<p>For more information about integrated file system commands, see the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ol>
|
|
<li>The directory to which the object is to be moved must not already contain the name supplied in the TOOBJ parameter (or in the case where TODIR is used, the name supplied in OBJ cannot exist in TODIR).
|
|
</li>
|
|
<li>Only objects that are a byte stream file type move between file systems.
|
|
</li>
|
|
<li>A directory cannot be moved to a subordinate directory.
|
|
</li>
|
|
<li>Database file members cannot be moved.
|
|
</li>
|
|
<li>Objects in QDLS can not be moved between auxiliary storage pools (ASPs).
|
|
</li>
|
|
<li>Libraries in independent ASP QSYS.LIB can not be moved to basic auxiliary storage pools (ASPs). However libraries in independent ASP QSYS.LIB can be moved to the system ASP or other independent ASPs.
|
|
</li>
|
|
<li>The move command does not copy the private authorities for objects when moving from one file system to another file system.
|
|
</li>
|
|
</ol>
|
|
<p>
|
|
<b>Note: </b>The authority requirements for this command are complex with respect to file systems, object types, requested operations etc.. Therefore, see the iSeries Security Reference, SC41-5302 book for information about the required authorities for this command.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="MOVE.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="#MOVE.OBJ"><b>OBJ</b></a></td>
|
|
<td valign="top">Object</td>
|
|
<td valign="top"><i>Path name</i></td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.TODIR"><b>TODIR</b></a></td>
|
|
<td valign="top">To directory</td>
|
|
<td valign="top"><i>Path name</i>, <b><u>'.'</u></b></td>
|
|
<td valign="top">Optional, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.TOOBJ"><b>TOOBJ</b></a></td>
|
|
<td valign="top">To object</td>
|
|
<td valign="top"><i>Path name</i></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.FROMCCSID"><b>FROMCCSID</b></a></td>
|
|
<td valign="top">From CCSID</td>
|
|
<td valign="top">1-65533, <b><u>*OBJ</u></b>, *PCASCII, *JOBCCSID</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.TOCCSID"><b>TOCCSID</b></a></td>
|
|
<td valign="top">To CCSID</td>
|
|
<td valign="top">1-65533, <b><u>*OBJ</u></b>, *CALC, *STDASCII, *PCASCII, *JOBCCSID</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.DTAFMT"><b>DTAFMT</b></a></td>
|
|
<td valign="top">Data Format</td>
|
|
<td valign="top"><b><u>*BINARY</u></b>, *TEXT</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.FROMCODPAG"><b>FROMCODPAG</b></a></td>
|
|
<td valign="top">From Code Page</td>
|
|
<td valign="top">1-32767, <b><u>*OBJ</u></b>, *PCASCII</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#MOVE.TOCODEPAGE"><b>TOCODEPAGE</b></a></td>
|
|
<td valign="top">To Code Page</td>
|
|
<td valign="top">1-32767, <b><u>*OBJ</u></b>, *CALC, *STDASCII, *PCASCII</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="MOVE.OBJ"></a>
|
|
<h3>Object (OBJ)</h3>
|
|
<p>Specifies the path name of the object or objects to be moved.
|
|
</p>
|
|
<p>The object path name can be either a simple name or a name that is qualified with the name of the directory in which the object is located. A pattern can be specified in the last part of the path name. An asterisk (*) matches any number of characters and a question mark (?) matches a single character. If the path name is qualified or contains a pattern, it must be enclosed in apostrophes.
|
|
</p>
|
|
<p>For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>An object name pattern can only be used when the <b>To directory (TODIR)</b> parameter is used.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.TODIR"></a>
|
|
<h3>To directory (TODIR)</h3>
|
|
<p>Specifies the path name of the directory to which the object is to be moved. The moved object uses the name supplied on the <b>Object (OBJ)</b> parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>.</u></b></dt>
|
|
<dd>The path object moves to the current directory.
|
|
</dd>
|
|
<dt><b><i>directory-name</i></b></dt>
|
|
<dd>Specify the name of the directory to which the object is to be moved.
|
|
<p>For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>The TODIR and <b>To object (TOOBJ)</b> parameters are mutually exclusive.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.TOOBJ"></a>
|
|
<h3>To object (TOOBJ)</h3>
|
|
<p>Specifies the path name of the directory the object is to be moved to and the new name of the object.
|
|
</p>
|
|
<p>For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>The <b>To directory (TODIR)</b> and TOOBJ parameters are mutually exclusive.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.FROMCCSID"></a>
|
|
<h3>From CCSID (FROMCCSID)</h3>
|
|
<p>Specifies the method for obtaining the coded character set identifier (CCSID) for the source of the move operation. This CCSID will be used for data conversion, if requested. This parameter is ignored if the object specified on the <b>Object (OBJ)</b> parameter is not a regular file. A regular file is a file that supports the integrated file system input/output (I/O) operations open, read, and write.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJ</u></b></dt>
|
|
<dd>Use the data CCSID of the object to be moved.
|
|
</dd>
|
|
<dt><b>*PCASCII</b></dt>
|
|
<dd>Use the data CCSID of the object to be moved to compute a CCSID in the Microsoft Windows encoding scheme (x4105) (Microsoft, Windows, Windows NT, and the Windows 95 logo are registered trademarks of Microsoft Corporation). Use this as the CCSID from which the data will be converted when DTAFMT(*TEXT) is specified. This option allows data from PCs to be converted properly if the data was created using Microsoft Windows.
|
|
</dd>
|
|
<dt><b>*JOBCCSID</b></dt>
|
|
<dd>The coded character set identifier (CCSID) from the default job CCSID is used.
|
|
</dd>
|
|
<dt><b><i>1-65533</i></b></dt>
|
|
<dd>Specify a CCSID value.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.TOCCSID"></a>
|
|
<h3>To CCSID (TOCCSID)</h3>
|
|
<p>Specifies the data coded character set identifier (CCSID) for the target of the move operation. This parameter is ignored if the object specified on the <b>Object (OBJ)</b> parameter is not a regular file. A regular file is a file that supports the integrated file system input/output (I/O) operations open, read, and write.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJ</u></b></dt>
|
|
<dd>Use the data CCSID of the object to be moved. If this CCSID cannot be used by the file system that the object is to be moved into, the move operation will fail.
|
|
</dd>
|
|
<dt><b>*CALC</b></dt>
|
|
<dd>Use the data CCSID of the object to be moved. If this CCSID cannot be used by the file system that the object is to be moved into, allow the file system to determine a different CCSID and continue with the move.
|
|
</dd>
|
|
<dt><b>*STDASCII</b></dt>
|
|
<dd>Compute a CCSID in the IBM PC Data encoding scheme (x2100), based on the source file's CCSID. Associate this CCSID for the target of the move operation and, if DTAFMT(*TEXT) is specified, also use this CCSID for the data conversion. If this CCSID cannot be used by the file system that the object is to be copied into, the move operation will fail.
|
|
</dd>
|
|
<dt><b>*PCASCII</b></dt>
|
|
<dd>Compute a CCSID in the Microsoft Windows encoding scheme (x4105), based on the source file's CCSID. Associate this CCSID with the target of the move operation and, if DTAFMT(*TEXT) is specified, also use this CCSID for the data conversion. This option allows the resulting data to be used by Microsoft Windows applications. If this CCSID cannot be used by the file system that the object is to be moved into, the move operation will fail.
|
|
</dd>
|
|
<dt><b>*JOBCCSID</b></dt>
|
|
<dd>The coded character set identifier (CCSID) from the default job CCSID is used.
|
|
</dd>
|
|
<dt><b><i>1-65533</i></b></dt>
|
|
<dd>Specify a CCSID value. If this CCSID cannot be used by the file system that the object is being moved into, the move operation will fail.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.DTAFMT"></a>
|
|
<h3>Data Format (DTAFMT)</h3>
|
|
<p>Specifies the format of the data in the file to be moved.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*BINARY</u></b></dt>
|
|
<dd>The file contains data in binary form (such as an executable file). Do not convert data on the move. However, if the object to be moved to has a different CCSID than the source object, all extended attributes will be converted into the CCSID of the new object before being set.
|
|
</dd>
|
|
<dt><b>*TEXT</b></dt>
|
|
<dd>The file contains data in textual form. Convert data to the CCSID of the new object during the move. The data is processed as text during the move.
|
|
<p>If a database member is to be moved to a stream file, any line-formatting characters (such as carriage return, tab, and end-of-file) are just converted from one CCSID to another.
|
|
</p>
|
|
<p>If a stream file is to be moved to a database member, the stream file must contain end-of-line characters or the move will fail. If the stream file does contain end-of-line characters, the following actions are performed during the move to a database file.
|
|
</p>
|
|
<ul>
|
|
<li>End-of-line characters are removed.
|
|
</li>
|
|
<li>Records are padded with blanks (for a source physical file member) or nulls (for a data physical file member).
|
|
</li>
|
|
<li>Tab characters are replaced by the appropriate number of blanks to the next tab position.
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.FROMCODPAG"></a>
|
|
<h3>From Code Page (FROMCODPAG)</h3>
|
|
<p>Specifies the method for obtaining the code page for source of the move operation. This code page will be used for data conversion, if requested. This parameter is ignored if the object specified on the <b>Object (OBJ)</b> parameter is not a regular file. A regular file is a file that supports the integrated file system input/output (I/O) operations open, read, and write.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>This parameter is replaced by the <b>From CCSID (FROMCCSID)</b> parameter, but the FROMCODPAG parameter can still be used. However, because this parameter may be removed in a later release, whenever possible use the FROMCCSID parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJ</u></b></dt>
|
|
<dd>Use the data code page of the object to be moved.
|
|
</dd>
|
|
<dt><b>*PCASCII</b></dt>
|
|
<dd>Use the data code page of the object to be moved to compute a code page in the Microsoft Windows encoding scheme (x4105) (Microsoft, Windows, Windows NT, and the Windows 95 logo are registered trademarks of Microsoft Corporation). Use this as the code page from which the data will be converted when DTAFMT(*TEXT) is specified. This option allows data from PCs to be converted properly if the data was created using Microsoft Windows.
|
|
</dd>
|
|
<dt><b><i>1-32767</i></b></dt>
|
|
<dd>Specify a code page value.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="MOVE.TOCODEPAGE"></a>
|
|
<h3>To Code Page (TOCODEPAGE)</h3>
|
|
<p>Specifies the data code page for the target of the move operation. This parameter is ignored if the object specified on the <b>Object (OBJ)</b> parameter is not a regular file. A regular file is a file that supports the integrated file system input/output (I/O) operations open, read, and write.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>This parameter is replaced by <b>To CCSID (TOCCSID)</b>, but the TOCODEPAGE parameter can still be used. However, because this parameter may be removed in a later release, whenever possible use the TOCCSID parameter.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OBJ</u></b></dt>
|
|
<dd>Use the data code page of the object to be moved. If this code page cannot be used by the file system that the object is to be moved into, the move operation will fail.
|
|
</dd>
|
|
<dt><b>*CALC</b></dt>
|
|
<dd>Use the data code page of the object to be moved. If this code page cannot be used by the file system that the object is to be moved into, allow the file system to determine a different code page and continue with the move.
|
|
</dd>
|
|
<dt><b>*STDASCII</b></dt>
|
|
<dd>Compute a code page in the IBM PC Data encoding scheme (x2100), based on the source file's code page. Associate this code page with the target of the move operation and, if DTAFMT(*TEXT) is specified, also use this code page for the data conversion. If this code page cannot be used by the file system that the object is to be moved into, the move operation will fail.
|
|
</dd>
|
|
<dt><b>*PCASCII</b></dt>
|
|
<dd>Compute a code page in the Microsoft Windows encoding scheme (x4105), based on the source file's code page. Associate this code page with the target of the move operation and, if DTAFMT(*TEXT) is specified, also use this code page for the data conversion. This option allows the resulting data to be used by Microsoft Windows applications. If this code page cannot be used by the file system that the object is to be moved into, the move operation will fail.
|
|
</dd>
|
|
<dt><b><i>1-32767</i></b></dt>
|
|
<dd>Specify a code page value. If this code page cannot be used by the file system that the object is to be moved into, the move operation will fail.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="MOVE.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p>The alternative command name for MOVE is MOV. The following examples use the alternative command name, but MOVE can be replaced directly for MOV in all of them.
|
|
</p>
|
|
<p><b>Example 1: Moving an Object</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
MOV OBJ('/CURRENT/DECEMBER-1994-MONTHLY-PAYROLL-FILE')
|
|
TODIR('/ARCHIVE')
|
|
</pre>
|
|
</p>
|
|
<p>This command moves a file named DECEMBER-1994-MONTHLY-PAYROLL-FILE from a directory named CURRENT to a directory named ARCHIVE.
|
|
</p>
|
|
<p><b>Example 2: Moving with Conversion</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
MOV OBJ('/DATAFB')
|
|
TOOBJ('/QSYS.LIB/APP1.LIB/DATA.FILE/DATAFB.MBR')
|
|
TOCODEPAGE(*CALC) DTAFMT(*TEXT) TOCCSID(*CALC)
|
|
</pre>
|
|
</p>
|
|
<p>The stream file 'DATAFB' is to be moved to the database file 'DATAFB.MBR'. By specifying TOCCSID(*CALC), the file system being moved to (the QSYS.LIB file system in this case) will try to create the new member in the same CCSID as '/DATAFB'. If this fails (in this case, if 'DATA.FILE is not in the same CCSID as 'DATAFB'), the file system will be allowed to choose an appropriate CCSID and complete the move. By specifying DTAFMT(*TEXT), the data in 'DATAFB' is handled as text and is converted into the CCSID chosen for the new file 'DATAFB.MBR'.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="MOVE.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPFA085</b></dt>
|
|
<dd>Home directory not found for user &1.
|
|
</dd>
|
|
<dt><b>CPFA08E</b></dt>
|
|
<dd>More than one name matches pattern.
|
|
</dd>
|
|
<dt><b>CPFA093</b></dt>
|
|
<dd>Name matching pattern not found.
|
|
</dd>
|
|
<dt><b>CPFA09C</b></dt>
|
|
<dd>Not authorized to object. Object is &1.
|
|
</dd>
|
|
<dt><b>CPFA0A1</b></dt>
|
|
<dd>An input or output error occurred.
|
|
</dd>
|
|
<dt><b>CPFA0A7</b></dt>
|
|
<dd>Path name too long.
|
|
</dd>
|
|
<dt><b>CPFA0B0</b></dt>
|
|
<dd>Request not allowed to operate from one file system to another.
|
|
</dd>
|
|
<dt><b>CPFA0B1</b></dt>
|
|
<dd>Requested operation not allowed. Access problem.
|
|
</dd>
|
|
<dt><b>CPFA0B2</b></dt>
|
|
<dd>No objects satisfy request.
|
|
</dd>
|
|
<dt><b>CPFA0B8</b></dt>
|
|
<dd>&1 objects moved. &2 objects failed.
|
|
</dd>
|
|
<dt><b>CPFA0C4</b></dt>
|
|
<dd>Object not a file. Object is &1.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#MOVE.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|