ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/rd.htm

203 lines
8.3 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Remove Directory (RD)</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="RD.Top_Of_Page"></a>
<h2>Remove Directory (RD)</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="#RD.PARAMETERS.TABLE">Parameters</a><br>
<a href="#RD.COMMAND.EXAMPLES">Examples</a><br>
<a href="#RD.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="RD"></a>
<p>The Remove Directory (RD) command removes a specified directory from the system after all objects in the directory have been unlinked and the directory is no longer in use. If a directory to be removed contains objects, this command optionally unlinks all of the objects and then deletes the directory. If the user does not have the authority to unlink every object in the directory, only those objects for which the user has the authority are unlinked. When an object cannot be unlinked, the directory and all objects in the directory that cannot be unlinked are not removed.
</p>
<p>This command is an alias for the Remove Directory (RMVDIR) command and can also be issued using the following alternative command names:
</p>
<ul>
<li>RMDIR
</li>
<li>RMVDIR
</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>In the "root" (/),QOpenSys and user-defined file systems, the user must have object existence (*OBJEXIST) authority for the specified directory, and *OBJEXIST authority for every object in it. If the user does not have *OBJEXIST authority for one or more objects in the directory, those objects are not unlinked and the directory is not removed.
</li>
<li>In the "root" (/),QOpenSys, and user-defined file systems, the user must have write, execute (*WX) authority to the parent directory.
</li>
<li>In the QDLS file system, the user must have all (*ALL) authority to the directory and execute (*X) authority to its parent directory.
</li>
<li>The user must have execute (*X) authority to the prefix directory.
</li>
<li>See the iSeries Security Reference, SC41-5302 book for the authority requirements for other file systems.
</li>
<li>A user cannot remove a directory within a "root" (/), QOpenSys, or user-defined file system directory that has the "restricted rename and unlink" attribute set on (this attribute is equivalent to the S_ISVTX mode bit) unless one or more of the following are true:
<ol>
<li>The user is the owner of the directory to be removed.
</li>
<li>The user is the owner of the parent directory of the directory to be removed.
</li>
<li>The user has all object (*ALLOBJ) special authority.
</li>
</ol>
</li>
<li>A directory can not be removed if it is the current directory for a job.
</li>
<li>This command cannot be used to delete reserved directories and libraries.
</li>
<li>When an object is in use in QSYS.LIB, independent ASP QSYS.LIB, or QDLS, the object cannot be unlinked. When an object is in use in QOpenSys or the "root" (/) file system, the object is successfully unlinked, and the object is deleted when no longer in use.
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#RD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="RD.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="#RD.DIR"><b>DIR</b></a></td>
<td valign="top">Directory</td>
<td valign="top"><i>Path name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#RD.RMVLNK"><b>RMVLNK</b></a></td>
<td valign="top">Remove link</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#RD.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="RD.DIR"></a>
<h3>Directory (DIR)</h3>
<p>Specifies the path name of the directory or a pattern to match the path name or names of directories to be removed.
</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>
</div>
<table width="100%">
<tr><td align="right"><a href="#RD.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RD.RMVLNK"></a>
<h3>Remove link (RMVLNK)</h3>
<p>Specifies whether to unlink all objects in a directory or not allow the directory to be deleted if it contains objects.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>Only an empty directory is removed. A directory may contain entries for the directory (.) and for the parent directory (..) and still be treated as an empty directory.
</dd>
<dt><b>*YES</b></dt>
<dd>All objects within the specified directory are deleted. If the file system that contains the directory does not support removal of links in the directory, error message CPFA0AC "Request cannot be completed. Directory contains objects." will be sent.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RD.COMMAND.EXAMPLES">Examples</a> </h3>
<p>The alternative command name for RD is RMVDIR. The following examples use the alternative command name, but RD can be replaced directly for RMVDIR in all of them.
</p>
<p><b>Example 1: Removing a Directory and the Objects in that Directory</b>
</p>
<p>
<pre>
RMVDIR DIR('W') RMVLNK(*YES)
</pre>
</p>
<p>This command removes directory W after all of its objects have been unlinked. If directory W contains objects and you have the authority to unlink all of those objects, all of the objects are unlinked and directory W is removed. If you do not have authority to unlink all of the objects, only those for which you have authority are unlinked and the directory is not removed.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RD.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RD.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 &amp;1.
</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 &amp;1.
</dd>
<dt><b>CPFA09D</b></dt>
<dd>Error occurred in program &amp;1.
</dd>
<dt><b>CPFA09E</b></dt>
<dd>Object in use. Object is &amp;1.
</dd>
<dt><b>CPFA0A1</b></dt>
<dd>An input or output error occurred.
</dd>
<dt><b>CPFA0A3</b></dt>
<dd>Path name resolution causes looping.
</dd>
<dt><b>CPFA0A7</b></dt>
<dd>Path name too long.
</dd>
<dt><b>CPFA0A9</b></dt>
<dd>Object not found. Object is &amp;1.
</dd>
<dt><b>CPFA0AB</b></dt>
<dd>Operation failed for object. Object is &amp;1.
</dd>
<dt><b>CPFA0AC</b></dt>
<dd>Request cannot be completed. Directory contains objects.
</dd>
<dt><b>CPFA0AD</b></dt>
<dd>Function not supported by file system.
</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>CPFA0B7</b></dt>
<dd>&amp;1 directories removed. &amp;2 directories not removed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RD.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>