× 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.



I do have a report data file in the program, but it isn't under commitment control. So it sounds like from what you and Nathan said, I got it right for once.


* Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Scott Klement wrote:
hi Jerry,

I wrote it so that (a) it is in its own activation group, and (b)
never sets on Last Record. The idea being that, after the first
invocation, it would still be available to the job without having to
reload it.

Yes, everything you've said is correct. In fact, this is the way that I've always written my trigger programs, because not only does it keep the program in memory, but if I ever really want to end the trigger, I can do so by reclaiming the activation group.

However -- a while back, Birgitta told me that this is a bad practice.

Her reasoning is that commitment control is scoped to the activation group. So if you have commitment control active and you write to a file that's in a different activation group, then whatever that trigger does is not covered by the commitment control, thus screwing up the "all these things are part of one transaction" nature of commitment control.

By contrast, if you use ACTGRP(*CALLER), the trigger will be under the same commitment control definition as the program that fired it, which is preferred.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.