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





Is there a downside to using *CALLER for the activation group on triggers? That sounds like it would "adapt" better to calls from various sources.


Unless I'm confused, triggers are always called by the database manager in the operating system. Not much to "adapt" to, since it's always the same program. I don't see why you'd want your trigger to be run in the same activation group as the database manager -- particularly since it's probably the default activation group (Though, I haven't tested that theory...).


Putting it in a named group gives me more control. I like to activate my triggers once, keep the files open, etc, so that they can be called over and over with the smallest possible performance penalty.

Putting them in a named activation group makes it possible for them to be cleaned up simply be deleting the activation group. I have a lot of utility service programs with very useful routines that I tend to call from all of my programs, including triggers. Because I used a named activation group for the trigger, and the utilities are compiled with *CALLER, I can reclaim the activation group and unload all of the utilities, and close all of the files, and free up all of the resources that they use with one simple command.

This is particularly helpful when I'm debugging my programs.

But, it's also occasionally useful for other things. For example, we have a daily batch job that rebuilds some of our files. Before that can be run, you have to get each user who uses those particular files to close them.

When my triggers that use them are compiled in a named activation group, I can have a break-handling program reclaim that actgrp, thus closign the files. Or, I can have a menu option that a user can run that does it. Or even have it be reclaimed by a CL program just before returning to the menu.

That allows me to keep a trigger loaded in memory, and only reclaim it when I need to.

If my triggers ran in the default activation group, I'd either have to close the files with each call to the trigger (awful performance!) or I'd have to make the user completely sign-off to close the files.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.