82 lines
5.4 KiB
HTML
82 lines
5.4 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="task" />
|
||
|
<meta name="DC.Title" content="Create trigger programs" />
|
||
|
<meta name="abstract" content="These topics discuss how to create and work with trigger programs." />
|
||
|
<meta name="description" content="These topics discuss how to create and work with trigger programs." />
|
||
|
<meta name="DC.subject" content="trigger programs, creating" />
|
||
|
<meta name="keywords" content="trigger programs, creating" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftra.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftrbopnaddtrig.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftrb1.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftrb2.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftri.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahftrc.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../cl/addpftrg.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmsthctrigger.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbaforzahftrb" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Create trigger programs</title>
|
||
|
</head>
|
||
|
<body id="rbaforzahftrb"><a name="rbaforzahftrb"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Create trigger programs</h1>
|
||
|
<div><p>These topics discuss how to create and work with trigger programs.</p>
|
||
|
<div class="section"> <p><img src="./delta.gif" alt="Start of change" />To add a trigger to a database file, follow these
|
||
|
steps:<img src="./deltaend.gif" alt="End of change" /></p>
|
||
|
</div>
|
||
|
<ol><li class="stepexpand"><span>Supply a trigger program. </span> You can write a trigger program
|
||
|
in a high-level language (HLL), Structured Query Language (SQL), or control
|
||
|
language (CL). </li>
|
||
|
<li class="stepexpand"><span>Use one of the following methods to add the trigger:</span> <ul><li>The Add Physical File Trigger (ADDPFTRG) command. You must specify your
|
||
|
trigger program in the trigger program (PGM) parameter on the command.</li>
|
||
|
<li>Add a trigger using iSeries™ Navigator. </li>
|
||
|
<li>The CREATE TRIGGER SQL statement. </li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbaforzahftrbopnaddtrig.htm">Add triggers using iSeries Navigator</a></strong><br />
|
||
|
<span><img src="./delta.gif" alt="Start of change" />Using iSeries Navigator, you can define system
|
||
|
triggers and SQL triggers. Additionally, you can enable or disable a trigger
|
||
|
on a physical database file.<img src="./deltaend.gif" alt="End of change" /></span></li>
|
||
|
<li class="ulchildlink"><strong><a href="rbaforzahftrb1.htm">How trigger programs work</a></strong><br />
|
||
|
<span><img src="./delta.gif" alt="Start of change" />When a user or application issues
|
||
|
a change or read operation on a database file that has an associated trigger,
|
||
|
the operation calls the appropriate trigger program or programs.<img src="./deltaend.gif" alt="End of change" /></span></li>
|
||
|
<li class="ulchildlink"><strong><a href="rbaforzahftrb2.htm">Other important information about working with triggers</a></strong><br />
|
||
|
These topics discuss recommendations, precautions, and error messages for trigger programs. Information about monitoring and commitment control is also included.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbaforzahftri.htm">Examples: Trigger programs</a></strong><br />
|
||
|
This topic provides examples of trigger programs written in C, COBOL, and RPG.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbaforzahftrc.htm">Trigger buffer sections</a></strong><br />
|
||
|
The trigger buffer has two logical sections: a static section and a variable section.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbaforzahftra.htm" title="A trigger is a set of actions that run automatically when a specified change or read operation is performed on a specified database file. On iSeries, you define a set of trigger actions in any supported high-level language.">Trigger automatic events in your database</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="../cl/addpftrg.htm">Add Physical File Trigger (ADDPFTRG) command</a></div>
|
||
|
<div><a href="../db2/rbafzmsthctrigger.htm">CREATE TRIGGER</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|