× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


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.

[Logo]<https://www.totalbizfulfillment.com/>    Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
1 Corporate Dr
Grantsville, MD 21536

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2023 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.