Thanks Kevin, I like the concept and explanation and -
I wouldn't mind seeing an example of the trigger program and an example of
one of the called programs.
John
<snip>
All of our files that have triggers get the same program as the trigger.
When the trigger fires, we take the file, library, event type, and time,
and go out to a file. If there is an active entry, we call the program and
pass along the buffer that is needed. You can have multiple entries and
call multiple trigger handlers as needed. Not as sophisticated as Alan
Campin's program, but it has worked well for us over the years. The file
looks like this:
Key Field Length Dec Type From To Text
TGDLCD 1 A 1 1 DELETE CODE
K2 TGFNM 10 A 2 11 FILE NAME
K1 TGFLIB 10 A 12 21 FILE LIBRARY
K3 TGSQ 5 0 P 22 24 TRIGGER SEQUENCE
TGDESC 50 A 25 74 DESCRIPTION
TGPNM 10 A 75 84 PROGRAM NAME
TGPLIB 10 A 85 94 PROGRAM LIBRARY
TGTIME 1 A 95 95 TRIGGER TIME
TGEVNT 1 A 96 96 TRIGGER EVENT
UISOURCE 1 A 97 97 ENTRY SOURCE
Kevin Bucknum
</snip>
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.
As an Amazon Associate we earn from qualifying purchases.