ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbaforzahftrm.htm

62 lines
3.8 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="reference" />
<meta name="DC.Title" content="Recommendations for trigger programs" />
<meta name="abstract" content="Here are the recommendations for a trigger program." />
<meta name="description" content="Here are the recommendations for a trigger program." />
<meta name="DC.Relation" scheme="URI" content="rbaforzahftrb2.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="rbaforzahftrm" />
<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>Recommendations for trigger programs</title>
</head>
<body id="rbaforzahftrm"><a name="rbaforzahftrm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Recommendations for trigger programs</h1>
<div><p>Here are the recommendations for a trigger program.</p>
<div class="section"><ul><li>Create the trigger program so that it runs under the user profile of the
user who created it. In this way, users who do not have the same level of
authority to the program will not encounter errors.</li>
<li>Create the program with USRPRF(*OWNER) and *EXCLUDE public authority,
and do not grant authorities to the trigger program to USER(*PUBLIC). Avoid
having the trigger program altered or replaced by other users. The database
calls the trigger program even if the user causing the trigger program to
run has authority to the trigger program.</li>
<li>Create the program as ACTGRP(*CALLER) if the program is running in an Integrated
Language Environment<sup>®</sup> (ILE). This allows the trigger program to run under
the same commitment definition as the application.</li>
<li>Open the file with a commit lock level the same as the application's commit
lock level. This allows the trigger program to run under the same commit lock
level as the application.</li>
<li>Create the program in the physical file's library.</li>
<li>Use commit or rollback in the trigger program if the trigger program runs
under a different activation group than the application.</li>
<li>Signal an exception if an error occurs or is detected in the trigger program.
If an error message is not signalled from the trigger program, the database
assumes that the trigger ran successfully. This might cause the user data
to end up in an inconsistent state.</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbaforzahftrb2.htm" title="These topics discuss recommendations, precautions, and error messages for trigger programs. Information about monitoring and commitment control is also included.">Other important information about working with triggers</a></div>
</div>
</div>
</body>
</html>