277 lines
10 KiB
HTML
277 lines
10 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>Remove Physical File Trigger (RMVPFTRG)</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="RMVPFTRG.Top_Of_Page"></a>
|
|
<h2>Remove Physical File Trigger (RMVPFTRG)</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="#RMVPFTRG.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#RMVPFTRG.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#RMVPFTRG.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="RMVPFTRG"></a>
|
|
<p>The Remove Physical File Trigger (RMVPFTRG) command removes the triggers that call trigger programs from a specified physical file. The triggers to be removed can be specified by trigger events, trigger times or trigger name. A trigger program is a program that has been added to the specified physical file by the Add Physical File Trigger (ADDPFTRG) command (system trigger) or the SQL CREATE TRIGGER statement (SQL trigger).
|
|
</p>
|
|
<p>If a trigger time, trigger event and trigger name are specified and the trigger time and event do not match the time and event for the trigger definition name, the trigger will not be removed.
|
|
</p>
|
|
<p>Once a trigger is removed from the physical file for a specified trigger time or event or name, the trigger program is no longer called when the trigger event occurs within the file. If the trigger was a system trigger, the trigger program continues to exist on the system. If the trigger was an SQL trigger, the trigger program is deleted.
|
|
</p>
|
|
<p>An exclusive-no-read lock is held on the physical file when removing the trigger from that file. All logical files which are built over the physical file are also held with the exclusive no-read lock.
|
|
</p>
|
|
<p><b>Restrictions:</b>
|
|
</p>
|
|
<ul>
|
|
<li>You must have object alter (*OBJALTER) or object management (*OBJMGT) authority to the physical file and execute (*EXECUTE) authority to the library that contains the file.
|
|
</li>
|
|
<li>If the physical file or a dependent logical file or Structured Query Language (SQL) view is opened in this or another job, the trigger cannot be removed.
|
|
</li>
|
|
<li>While this command is running, neither the physical file nor any dependent logical files can be opened.
|
|
</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.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="RMVPFTRG.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="#RMVPFTRG.FILE"><b>FILE</b></a></td>
|
|
<td valign="top">Physical 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: Physical file</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#RMVPFTRG.TRGTIME"><b>TRGTIME</b></a></td>
|
|
<td valign="top">Trigger time</td>
|
|
<td valign="top"><b><u>*ALL</u></b>, *BEFORE, *AFTER</td>
|
|
<td valign="top">Optional, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RMVPFTRG.TRGEVENT"><b>TRGEVENT</b></a></td>
|
|
<td valign="top">Trigger event</td>
|
|
<td valign="top"><b><u>*ALL</u></b>, *INSERT, *DELETE, *UPDATE, *READ</td>
|
|
<td valign="top">Optional, Positional 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RMVPFTRG.TRG"><b>TRG</b></a></td>
|
|
<td valign="top">Trigger</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*ALL</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RMVPFTRG.TRGLIB"><b>TRGLIB</b></a></td>
|
|
<td valign="top">Trigger library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*FILE</u></b>, *CURLIB</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="RMVPFTRG.FILE"></a>
|
|
<h3>Physical file (FILE)</h3>
|
|
<p>Specifies the physical file from which the trigger is to be removed. The specified file must exist on the system.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p><b>Qualifier 1: Physical file</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the file from which the trigger is to be removed.
|
|
</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 library is specified as the current library for the job, the QGPL library is used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library to be searched.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RMVPFTRG.TRGTIME"></a>
|
|
<h3>Trigger time (TRGTIME)</h3>
|
|
<p>Specifies the trigger to be removed, based on the time when the trigger program is called.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ALL</u></b></dt>
|
|
<dd>All triggers for programs called either before or after a trigger event are removed.
|
|
</dd>
|
|
<dt><b>*BEFORE</b></dt>
|
|
<dd>The triggers for programs called before a trigger event are removed.
|
|
</dd>
|
|
<dt><b>*AFTER</b></dt>
|
|
<dd>The triggers for programs called after a trigger event are removed.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RMVPFTRG.TRGEVENT"></a>
|
|
<h3>Trigger event (TRGEVENT)</h3>
|
|
<p>Specifies the trigger event for which the associated triggers are removed.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ALL</u></b></dt>
|
|
<dd>All triggers for insert, delete, and update operations are removed.
|
|
</dd>
|
|
<dt><b>*INSERT</b></dt>
|
|
<dd>The triggers for insert operations are removed.
|
|
</dd>
|
|
<dt><b>*DELETE</b></dt>
|
|
<dd>The triggers for delete operations are removed.
|
|
</dd>
|
|
<dt><b>*UPDATE</b></dt>
|
|
<dd>The triggers for update operations are removed.
|
|
</dd>
|
|
<dt><b>*READ</b></dt>
|
|
<dd>The triggers for read operations are removed.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RMVPFTRG.TRG"></a>
|
|
<h3>Trigger (TRG)</h3>
|
|
<p>Specifies the name of the trigger being removed.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ALL</u></b></dt>
|
|
<dd>All trigger definitions are removed, including SQL triggers.
|
|
</dd>
|
|
<dt><b><i>character-value</i></b></dt>
|
|
<dd>Specify the name of the trigger. You can specify a maximum of 128 characters without delimiters, or 258 characters with quotation mark (") delimiters.
|
|
</dd>
|
|
</dl>
|
|
<p>The following are examples of the TRG parameter dependencies:
|
|
</p>
|
|
<ul>
|
|
<li>TRG(*ALL) TRGTIME(*ALL) TRGEVENT(*ALL) - All triggers are removed.
|
|
</li>
|
|
<li>TRG(*ALL) TRGTIME(*INSERT) TRGEVENT(*AFTER) - All *INSERT *AFTER triggers are removed.
|
|
</li>
|
|
<li>TRG(ABC) TRGTIME(*ALL) TRGEVENT(*ALL) - The triggers named ABC are removed.
|
|
</li>
|
|
<li>TRG(ABC) TRGTIME(*BEFORE) TRGEVENT(*INSERT) - The trigger named ABC is removed if the trigger time is *BEFORE and the triggered event is *INSERT. If the trigger time and triggered event do not match, trigger ABC will not be removed.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RMVPFTRG.TRGLIB"></a>
|
|
<h3>Trigger library (TRGLIB)</h3>
|
|
<p>Specifies the library for the trigger being removed.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>The special values *LIBL and *CURLIB are the values of the job running when the trigger is removed.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*FILE</u></b></dt>
|
|
<dd>The library for the file specified for the <b>Physical file (FILE)</b> parameter is used.
|
|
</dd>
|
|
<dt><b>*CURLIB</b></dt>
|
|
<dd>The current library for the job is used. If no library is specified as the current library for the job, the QGPL library is used.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library to be used.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="RMVPFTRG.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Removing All Triggers for Insert Events</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
RMVPFTRG FILE(EMP) TRGEVENT(*INSERT)
|
|
</pre>
|
|
</p>
|
|
<p>This command removes all triggers for programs called by insert operations from the physical file named EMP.
|
|
</p>
|
|
<p><b>Example 2: Removing All Triggers for Programs Called Before a Trigger Event</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
RMVPFTRG FILE(EMP) TRGTIME(*BEFORE)
|
|
</pre>
|
|
</p>
|
|
<p>This command removes all triggers for programs called before trigger events from the physical file named EMP.
|
|
</p>
|
|
<p><b>Example 3: Removing a Trigger for a Program Called After an Insert Event</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
RMVPFTRG FILE(EMP) TRGTIME(*AFTER) TRGEVENT(*INSERT)
|
|
</pre>
|
|
</p>
|
|
<p>This command removes the trigger for the program called after an insert operation from the physical file named EMP.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="RMVPFTRG.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>CPF32C6</b></dt>
|
|
<dd>Trigger operation not successful.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RMVPFTRG.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|