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



Scott Klement wrote:
> 
> >
> > 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...).

Scott, the database manager calls the trigger program in the same
activation group as the program causing the trigger to be invoked.  Not
sure how it manages it, but it does.  For anyone who wants to
experiment, here's a program I have that will display the activation
group it's running in.  If you make this program your *caller trigger
program for some test file, you can experiment with different activation
groups accessing your file.

H bnddir('QC2LE') actgrp(*caller)    
D MAGP_Template...                   
D                 ds                 
D   MAGP_size                   10i 0
D   MAGP_used                   10i 0
D                                8A  
 * MAGP_AG_Attr_T starts here        
D                                 *  
D                               16a  
D                                 *  
D   act_grp_name                30a  
D                                5u 0
D   act_grp_mark                10u 0
D                               10u 0
D                               10u 0
D                               10u 0
D                               10u 0                            
D                               10u 0                            
D                               10u 0                            
D matagpat        pr                  extproc ('matagpat')       
D   template                          like(MAGP_Template)        
D   actgrpmark                  10i 0 value                      
D   attr_select                 10u 0 value                      
                                                                 
D MAGP_BASIC_ATTRS...                                            
D                 C                   0                          
                                                                 
C                   eval      MAGP_Template = *ALLX'00'          
C                   eval      MAGP_Size = %size(MAGP_Template)   
C                   callp     matagpat (MAGP_Template            
C                                     : 0                        
C                                     : MAGP_BASIC_ATTRS)        
C                   if        act_grp_mark = 1 or                   
C                             act_grp_mark = 2                      
C                   eval      act_grp_name = '*DFTACTGRP'           
C                   endif                                           
C     act_grp_name  dsply                   act_grp_mark            
C                   seton                                        lr


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.