323 lines
12 KiB
HTML
323 lines
12 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>Delete File (DLTF)</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="DLTF.Top_Of_Page"></a>
|
|
<h2>Delete File (DLTF)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
|
<b>Threadsafe: </b>Conditional
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#DLTF.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#DLTF.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#DLTF.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="DLTF"></a>
|
|
<p>The Delete File (DLTF) command deletes one or more files from the system.
|
|
</p>
|
|
<p>If a database (physical or logical) file is deleted, all members contained in the file are also deleted. A physical file can be deleted only if no logical files are associated with it. If an intersystem communications function (ICF) file is deleted, all the program device entries contained in the file are also deleted. If the file being deleted is being used by a program (the file is open), the file is not deleted.
|
|
</p>
|
|
<p>A delete operation by generic name deletes every file with that generic name that is eligible to be deleted. For each file that cannot be deleted, a diagnostic message is sent. Files can be ineligible to be deleted for the following reasons:
|
|
</p>
|
|
<ul>
|
|
<li>Logical files must be deleted before the physical files on which they are based can be deleted.
|
|
</li>
|
|
<li>SQL views must be deleted before the physical files, SQL tables, or SQL views on which they are based can be deleted.
|
|
</li>
|
|
</ul>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ul>
|
|
<li>You must have object existence (*OBJEXIST) and object operational (*OBJOPR) authorities for the file. You also need execute (*EXECUTE) authority for the library that contains the file.
|
|
</li>
|
|
<li>If a physical file is being deleted and a logical file is using the data in the physical file, the logical file must be deleted first.
|
|
</li>
|
|
<li>If a physical file or SQL view is referenced in the select-list of an SQL materialized query table, DLTF is not allowed. The materialized query table must be deleted first.
|
|
</li>
|
|
<li>If the DLTF command is entered when debugging and UPDPROD(*NO) was specified on the Start Debug (STRDBG) or Change Debug (CHGDBG) command, a physical file that contains data and is in a production library cannot be deleted.
|
|
</li>
|
|
<li>This command is conditionally threadsafe. In multithreaded jobs, this command is not threadsafe for distributed files and fails for distributed files that use relational databases of type *SNA. This command is also not threadsafe and fails for Distributed Data Management (DDM) files of type *SNA, when SYSTEM(*RMT) or SYSTEM(*FILETYPE) is specified.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="DLTF.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" rowspan="3"><a href="#DLTF.FILE"><b>FILE</b></a></td>
|
|
<td valign="top">File</td>
|
|
<td valign="top"><i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: File</td>
|
|
<td valign="top"><i>Generic name, name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB, *USRLIBL, *ALL, *ALLUSR</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#DLTF.SYSTEM"><b>SYSTEM</b></a></td>
|
|
<td valign="top">System</td>
|
|
<td valign="top"><b><u>*LCL</u></b>, *RMT, *FILETYPE</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#DLTF.RMVCST"><b>RMVCST</b></a></td>
|
|
<td valign="top">Remove constraint</td>
|
|
<td valign="top"><b><u>*RESTRICT</u></b>, *REMOVE, *KEEP</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="DLTF.FILE"></a>
|
|
<h3>File (FILE)</h3>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p>Specifies the file or files to be deleted. A specific file name or a generic file name can be specified.
|
|
</p>
|
|
<p>Files that are defined or established as parent or dependent files of a referential constraint can be deleted. If the file being deleted is a dependent file, the following items are also removed:
|
|
</p>
|
|
<ul>
|
|
<li>All constraint relationships for the dependent file
|
|
</li>
|
|
<li>All foreign key access paths and foreign keys for the dependent file
|
|
</li>
|
|
</ul>
|
|
<p>If the file being deleted is a parent file, the <b>Remove constraint (RMVCST)</b> parameter is used to specify the constraint relationships to be removed.
|
|
</p>
|
|
<p><b>Qualifier 1: File</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>generic-name</i></b></dt>
|
|
<dd>Specify the generic name of the file being deleted. A generic name can be specified as a character string that contains one or more characters followed by an asterisk (*).
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the file to be deleted.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the library list for the current thread are searched until the first match is found.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></dt>
|
|
<dd>The current library for the job is searched. If no current library exists in the library list, library QGPL is searched.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*USRLIBL</b></dt>
|
|
<dd>If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are searched. If there is no current library entry, only the libraries in the user portion of the library list are searched.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*ALL</b></dt>
|
|
<dd>All libraries in the system, including QSYS, are searched. If an object name is specified (instead of a generic name), the first object found with that name is deleted.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*ALLUSR</b></dt>
|
|
<dd>All user libraries are searched. All libraries with names that do not begin with the letter Q are searched except for the following:
|
|
<p>
|
|
<pre>
|
|
#CGULIB #DSULIB #SEULIB
|
|
#COBLIB #RPGLIB
|
|
#DFULIB #SDALIB
|
|
</pre>
|
|
</p>
|
|
<p>Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered user libraries and are also searched:
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
QDSNX QRCLxxxxx QUSRIJS QUSRVxRxMx
|
|
QGPL QSRVAGT QUSRINFSKR
|
|
QGPL38 QSYS2 QUSRNOTES
|
|
QMGTC QSYS2xxxxx QUSROND
|
|
QMGTC2 QS36F QUSRPOSGS
|
|
QMPGDATA QUSER38 QUSRPOSSA
|
|
QMQMDATA QUSRADSM QUSRPYMSVR
|
|
QMQMPROC QUSRBRM QUSRRDARS
|
|
QPFRDATA QUSRDIRCL QUSRSYS
|
|
QRCL QUSRDIRDB QUSRVI
|
|
</pre>
|
|
</p>
|
|
<ol>
|
|
<li>'xxxxx' is the number of a primary auxiliary storage pool (ASP).
|
|
</li>
|
|
<li>A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="DLTF.SYSTEM"></a>
|
|
<h3>System (SYSTEM)</h3>
|
|
<p>Specifies whether the file is deleted from the local system or from a remote system.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LCL</u></b></dt>
|
|
<dd>The file is deleted from the local system.
|
|
</dd>
|
|
<dt><b>*RMT</b></dt>
|
|
<dd>The file is deleted from a remote system. A DDM file must be specified for the <b>File (FILE)</b> parameter. The DDM file identifies the file to be deleted and also identifies the remote system.
|
|
</dd>
|
|
<dt><b>*FILETYPE</b></dt>
|
|
<dd>The file is deleted from the local system if a DDM file is not specified for the FILE parameter. If a DDM file is specified for the FILE parameter, the remote file identifier in the DDM file is deleted from the remote system.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="DLTF.RMVCST"></a>
|
|
<h3>Remove constraint (RMVCST)</h3>
|
|
<p>Specifies how much of the constraint relationships are removed in the associated set of dependent files when you are deleting a parent file of a referential constraint.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*RESTRICT</u></b></dt>
|
|
<dd>The parent file is not deleted and the constraint relationship is not removed if a constraint relationship is defined or established between the parent file and a dependent file. Neither the foreign key access path nor the foreign key of the dependent file is removed.
|
|
</dd>
|
|
<dt><b>*REMOVE</b></dt>
|
|
<dd>The constraint relationship between the parent file and a dependent file is removed. The corresponding foreign key access path (if one exists and is not shared) and foreign key of a dependent file are removed.
|
|
</dd>
|
|
<dt><b>*KEEP</b></dt>
|
|
<dd>The constraint relationship is no longer established, but the constraint definition is not removed. Neither the foreign key access path nor the foreign key of the dependent file is removed.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="DLTF.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Deleting a Specific File</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
DLTF FILE(BILLING/ORDERS)
|
|
</pre>
|
|
</p>
|
|
<p>This command deletes the file named ORDERS in library BILLING. Only the BILLING library is searched for the file.
|
|
</p>
|
|
<p><b>Example 2: Deleting a Parent File of a Referential Constraint</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
DLTF FILE(BILLING/QUERIES) RMVCST(*KEEP)
|
|
</pre>
|
|
</p>
|
|
<p>This command deletes the file named QUERIES in the library BILLING. Because the QUERIES file is a parent file of a referential constraint, the established referential constraint is removed, but the definition of the constraint is not removed.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="DLTF.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPF0601</b></dt>
|
|
<dd>Not allowed to do operation to file &1 in &2.
|
|
</dd>
|
|
<dt><b>CPF0605</b></dt>
|
|
<dd>Device file &1 in &2 saved with storage freed.
|
|
</dd>
|
|
<dt><b>CPF0607</b></dt>
|
|
<dd>File deleted by another job.
|
|
</dd>
|
|
<dt><b>CPF0610</b></dt>
|
|
<dd>File &1 in &2 not available.
|
|
</dd>
|
|
<dt><b>CPF0675</b></dt>
|
|
<dd>Device file &1 in &2 is in use.
|
|
</dd>
|
|
<dt><b>CPF2105</b></dt>
|
|
<dd>Object &1 in &2 type *&3 not found.
|
|
</dd>
|
|
<dt><b>CPF2110</b></dt>
|
|
<dd>Library &1 not found.
|
|
</dd>
|
|
<dt><b>CPF2114</b></dt>
|
|
<dd>Cannot allocate object &1 in &2 type *&3.
|
|
</dd>
|
|
<dt><b>CPF2117</b></dt>
|
|
<dd>&4 objects type *&3 deleted. &5 objects not deleted.
|
|
</dd>
|
|
<dt><b>CPF2182</b></dt>
|
|
<dd>Not authorized to library &1.
|
|
</dd>
|
|
<dt><b>CPF2189</b></dt>
|
|
<dd>Not authorized to object &1 in &2 type *&3.
|
|
</dd>
|
|
<dt><b>CPF2190</b></dt>
|
|
<dd>Not able to do remote delete or rename request.
|
|
</dd>
|
|
<dt><b>CPF320B</b></dt>
|
|
<dd>Operation was not valid for database file &1.
|
|
</dd>
|
|
<dt><b>CPF3203</b></dt>
|
|
<dd>Cannot allocate object for file &1 in &2.
|
|
</dd>
|
|
<dt><b>CPF3219</b></dt>
|
|
<dd>Cannot delete file or member of file &1 in &2.
|
|
</dd>
|
|
<dt><b>CPF3220</b></dt>
|
|
<dd>Cannot do operation on file &1 in &2.
|
|
</dd>
|
|
<dt><b>CPF323C</b></dt>
|
|
<dd>QRECOVERY library could not be allocated.
|
|
</dd>
|
|
<dt><b>CPF324B</b></dt>
|
|
<dd>Cannot allocate dictionary for file &1.
|
|
</dd>
|
|
<dt><b>CPF3252</b></dt>
|
|
<dd>Maximum number of machine locks exceeded.
|
|
</dd>
|
|
<dt><b>CPF326A</b></dt>
|
|
<dd>Operation not successful for file &1 in library &2.
|
|
</dd>
|
|
<dt><b>CPF327F</b></dt>
|
|
<dd>Operation not successful for file &1 in library &2.
|
|
</dd>
|
|
<dt><b>CPF3273</b></dt>
|
|
<dd>File or member not created, deleted or changed.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#DLTF.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|