Greg,
Happy 2023 ...
The trouble with triggers
==================
If you are modifying the actual trigger program that is attached to the PF via ADDPFTRG, you cannot change it while it is "in use" -- e.g. while the file is OPEN in any jobs on the system, because Db2i places a lock on the trigger *PGM object for the duration of the OPEN/CLOSE. :-o
Is this a "before" or "after" trigger? If it is an "after" trigger then the program cannot modify the contents of the trigger buffer, so there is really no reason to CALL the program directly from within the trigger itself ... as that will only delay the completion of the I/O that invoked the trigger ... and you have all of those ugly "Activation Group" issues to worry about.
If you need to modify your trigger program anyway, you could change it to write the trigger buffer into a data queue that you create specifically for use with this PF and then have a separate "listener" job running, that calls the QRCVDTAQ API to wait for any records to arrive ... Then, when a new record arrives, that "listener" program CALLs the program previously called by your original trigger, then loops back to QRCVDTAQ to await the next record ...
This way, you can much more easily control what activation groups are in use, because this "listener" program is running in a separate job. :-)
Hope that helps,
Mark S. Waterbury
On Tuesday, January 3, 2023 at 10:23:54 AM EST, Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
I have a trigger program (HH110TRG) attached to a PF that simply takes the trigger buffer and calls another program (HH110).
Both programs are DFTACTGRP(*NO) ACTGRP(*CALLER)
In the second program, I call procedures from several service programs. I use a binding directory to
I need to change one of the service programs.
What activation group is being used by the PF Trigger?
Do I need to RCLACTGRP before my changes take place?
Finally, the procedure change involves increasing the size of data structure used as a parameter on several procedures. I don't think this will be an issue.
My plan is to make the changes, CRTRPGMOD and then UPDSRVPGM. I'm hoping the changes will be that simple.
TIA,
Greg
[Logo]<
https://www.totalbizfulfillment.com/> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
www.totalbizfulfillment.com<
http://www.totalbizfulfillment.com>
As an Amazon Associate we earn from qualifying purchases.