46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
|
******************************************************************************
|
||
|
*
|
||
|
* Sample trigger program
|
||
|
*
|
||
|
* Module %M% Version %I% Date %H%
|
||
|
*
|
||
|
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
|
||
|
* This is unpublished proprietary source code of Ardent Software Inc.
|
||
|
* The copyright notice above does not evidence any actual or intended
|
||
|
* publication of such source code.
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
*
|
||
|
* Maintenence log - insert most recent change descriptions at top
|
||
|
*
|
||
|
* Date.... GTAR# WHO Description........................................
|
||
|
* 10/14/98 23801 SAP Change copyrights.
|
||
|
* 07/10/97 20453 CSM Initial programming
|
||
|
*
|
||
|
*******************************************************************************
|
||
|
* This subroutine can be used as a sample trigger program.
|
||
|
* It displays all the relevant arguments of a trigger.
|
||
|
******************************************************************************
|
||
|
|
||
|
SUBROUTINE TRIGSAMPLE(trig.name, trig.schema, trig.table, trig.event, trig.time, trig.id, trig.rec, trig.id.old, trig.rec.old, trig.assoc, trig.assoc.event, trig.count, trig.chain.casc, trig.cascade)
|
||
|
|
||
|
print " Trigger ":trig.name
|
||
|
print " Schema ":trig.schema:", Table ":trig.table
|
||
|
print " for ":trig.time:" ":trig.event
|
||
|
print " id ":trig.id:" record ":trig.rec
|
||
|
print " old id ":trig.id.old:" old record ":trig.rec.old
|
||
|
|
||
|
if trig.assoc <> "" then
|
||
|
print " association ":trig.assoc:", operation ":trig.assoc.event
|
||
|
end
|
||
|
|
||
|
if trig.chain.casc > 0
|
||
|
then print " ":trig.count:" active trigger(s), ":trig.chain.casc:" since last cascade"
|
||
|
else print " ":trig.count:" active trigger(s)"
|
||
|
|
||
|
if trig.cascade <> "" then
|
||
|
print " last cascade operation was ":trig.cascade
|
||
|
end
|
||
|
|
||
|
return
|