Mark - Happy New Year to you as well!
I found a post on code400.com from 2016 - my OWN post lol - that answers most of my questions about the activation groups involved.
I'm not changing the trigger program itself... I'm changing the program that is called by the trigger program. So there shouldn't be a lock.
This is an "after" trigger.
I like your suggestion... but I'm not at a place to make such a fundamental change to this process.
All of the programs updating the file are using ACTGRP(*NEW) - this would be our ERP. They were converted to RPGLE but nothing more.
So I think I should be OK changing the SRVPGM since a named activation group wouldn't be used (and the programs end).
Greg
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Mark Waterbury
Sent: Tuesday, January 3, 2023 11:07 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: ACTGRP for a PF Trigger
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>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.