Published on System iNetwork (http://systeminetwork.com)
Find Trigger Program
By linda.harty@penton.com
Created Jul 10 2008 - 13:21

By:
Scott Klement [1]

Q: I have a program that I use as a database trigger. I know that it's attached to many files, but I don't know which ones. Given the program name, how can I see which files it's attached to?

Q: The operating system maintains a database file, SYSTRIGGER, that contains information about all the triggers on the system. With this database file in mind, you could, for example, write an SQL query that lists the files that use a given program name:

select TabName from SYSTRIGGER where TrigPgm='Your Program Name'

Or if you wanted something a little fancier, you could do this:

select substr(tabSchema,1,10) as Library,
       substr(TabName,1,10) as File,
       TrigTime as Time,
       TrigEvent as Event                    
 from SYSTRIGGER                                     
where TrigPgm='Your Program Name'
  and TrigPgmLib='Library Containing Program'
© 2010 Penton Media, Inc.

Source URL: http://systeminetwork.com/article/find-trigger-program

Links:
[1] http://systeminetwork.com/author/scott-klement