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

196 lines
7.6 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>Add Link (ADDLNK)</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="ADDLNK.Top_Of_Page"></a>
<h2>Add Link (ADDLNK)</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="#ADDLNK.PARAMETERS.TABLE">Parameters</a><br>
<a href="#ADDLNK.COMMAND.EXAMPLES">Examples</a><br>
<a href="#ADDLNK.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="ADDLNK"></a>
<p>The Add Link (ADDLNK) command adds a link to an object. The <b>New link (NEWLNK)</b> parameter specifies the name for the new link. The <b>Object (OBJ)</b> parameter specifies the current name of the object that is to receive the new link. After the link is established the object may be referred to by either the old name or the new name.
</p>
<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>This command works on only one object. If a pattern is specified on the OBJ parameter and more than one object matches the pattern, the user can select the object from a list in an interactive job. If this is a batch job, the command will fail with error message CPFA08E "More than one name matches pattern.". A pattern is not allowed if the LNKTYPE is symbolic, because the object is not required to exist.
</li>
<li>The user must have write (*W) and execute (*X) authority to the directory that contains the new link. If a hard link is to be added, the user must also have object existence (*OBJEXIST) authority to the existing object and *X authority to each of the path name prefixes of the OBJ name.
</li>
<li>A hard link cannot be created to a symbolic link. When LNKTYPE(*HARD) is specified and the OBJ parameter names a symbolic link, the link is created to the resolved object (which must exist).
</li>
<li>A hard link cannot be created to a directory.
</li>
<li>A hard link cannot be created to an object in another file system.
</li>
<li>No links can be created in the QSYS.LIB, independent ASP QSYS.LIB or QDLS portion of the name space.
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="ADDLNK.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="#ADDLNK.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="#ADDLNK.NEWLNK"><b>NEWLNK</b></a></td>
<td valign="top">New link</td>
<td valign="top"><i>Path name</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#ADDLNK.LNKTYPE"><b>LNKTYPE</b></a></td>
<td valign="top">Link type</td>
<td valign="top"><b><u>*SYMBOLIC</u></b>, *HARD</td>
<td valign="top">Optional, Positional 3</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="ADDLNK.OBJ"></a>
<h3>Object (OBJ)</h3>
<p>Specifies the path name of the object the user wants to add a link to. This object must exist unless a symbolic link is to be added.
</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="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDLNK.NEWLNK"></a>
<h3>New link (NEWLNK)</h3>
<p>Specifies the new path name that can be used to refer to the object. The new name must not exist.
</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="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ADDLNK.LNKTYPE"></a>
<h3>Link type (LNKTYPE)</h3>
<p>Specifies whether the link is hard or symbolic.
</p>
<dl>
<dt><b><u>*SYMBOLIC</u></b></dt>
<dd>The link to the object is a representation of a path name. This representation is in the form of a path contained in a file. The actual path is determined by doing a path search based on the contents of the file. A symbolic link is also called soft link.
<p>Symbolic links can cross file systems. An object need not exist. An existing object can be deleted without removing the symbolic link.
</p>
</dd>
<dt><b>*HARD</b></dt>
<dd>The link to the object is an actual path to an existing object. A hard link is established by creating a directory entry.
<p>Hard links cannot cross file systems. When all hard links to an object are removed, the space occupied by the object is freed and the object can no longer be accessed. An object cannot be removed while a hard link to it exists.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ADDLNK.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Adding a Symbolic Link</b>
</p>
<p>
<pre>
ADDLNK OBJ('DECEMBER-1994-MONTHLY-PAYROLL-FILE') NEWLNK('PAY')
</pre>
</p>
<p>This command adds a symbolic link named "PAY" to the DECEMBER-1994-MONTHLY-PAYROLL-FILE.
</p>
<p><b>Example 2: Adding a Symbolic Link to a Source File</b>
</p>
<p>
<pre>
ADDLNK OBJ('/QSYS.LIB/MYLIB.LIB/F1.FILE/P1.MBR')
NEWLNK('PGM1') LNKTYPE(*SYMBOLIC)
</pre>
</p>
<p>This command adds a symbolic link from the user's current directory (not in QSYS.LIB, independent ASP QSYS.LIB, or QDLS) to a member in a source file in QSYS.LIB.
</p>
<p><b>Example 3: Adding a Hard Link</b>
</p>
<p>
<pre>
ADDLNK OBJ('/QOpenSys/MYDIR/FILE1') NEWLNK('FILE2')
LNKTYPE(*HARD)
</pre>
</p>
<p>This command adds a hard link from the user's current directory, with the name FILE2, to FILE1 in /QOpenSys/MYDIR.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ADDLNK.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>CPFA089</b></dt>
<dd>Pattern not allowed in path name.
</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 &amp;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>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ADDLNK.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>