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

131 lines
5.0 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>Retrieve Current Directory (RTVCURDIR)</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="RTVCURDIR.Top_Of_Page"></a>
<h2>Retrieve Current Directory (RTVCURDIR)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>Compiled CL program or interpreted REXX (*BPGM *IPGM *BREXX *IREXX)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#RTVCURDIR.PARAMETERS.TABLE">Parameters</a><br>
<a href="#RTVCURDIR.COMMAND.EXAMPLES">Examples</a><br>
<a href="#RTVCURDIR.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="RTVCURDIR"></a>
<p>The Retrieve Current Directory (RTVCURDIR) command is used in a control language (CL) program to retrieve the name of the current directory into the specified CL variable. An absolute path name containing no symbolic links is retrieved. The length of the name of the current directory is also retrieved.
</p>
<p>The CL prompt for this command lists the minimum length for retrieved variables next to the appropriate parameters. For character variables, a single number is shown. For decimal variables, two numbers are shown. The first number indicates the minimum variable length and the second number indicates the minimum number of decimal positions.
</p>
<p><b>Restrictions:</b>
</p>
<ol>
<li>Execute (*X) authority is required to the current directory and the user must have read, execute (*RX) authority to each directory in the path.
</li>
<li>This command is valid only within a CL program.
</li>
<li>The maximum length of a directory name that can be retrieved is limited by the maximum length of a character variable.
<p>
<b>Note: </b>The maximum length of a character variable cannot exceed 9999 bytes.
</p>
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#RTVCURDIR.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="RTVCURDIR.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="#RTVCURDIR.RTNDIR"><b>RTNDIR</b></a></td>
<td valign="top">CL var for RTNDIR (9999)</td>
<td valign="top"><i>Character value</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#RTVCURDIR.DIRNAMLEN"><b>DIRNAMLEN</b></a></td>
<td valign="top">CL var for DIRNAMLEN (7 0)</td>
<td valign="top"><i>Decimal number</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#RTVCURDIR.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="RTVCURDIR.RTNDIR"></a>
<h3>CL var for RTNDIR (9999) (RTNDIR)</h3>
<p>Specifies the name of the CL variable that receives the name of the current directory. The variable must be a character variable. If the current directory name has fewer characters than the variable allows, the value is not padded.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RTVCURDIR.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RTVCURDIR.DIRNAMLEN"></a>
<h3>CL var for DIRNAMLEN (7 0) (DIRNAMLEN)</h3>
<p>Specifies the name of the CL variable that receives the length (in bytes) of the current directory name. This length can be longer than the length of the character variable to receive the directory name. The variable must be a 7-digit decimal variable specified with no decimal positions.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RTVCURDIR.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RTVCURDIR.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Retrieving the Current Directory</b>
</p>
<p>
<pre>
RTVCURDIR RTNDIR(&amp;CD) DIRNAMLEN(&amp;CDLEN)
</pre>
</p>
<p>This command retrieves the name of the current directory and the length of the name of the current directory into the CD and CDLEN variables.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RTVCURDIR.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RTVCURDIR.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>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>CPFA0A9</b></dt>
<dd>Object not found. Object is &amp;1.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RTVCURDIR.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>