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



At one point, I thought named activation groups were shared across jobs,
which then made them very attractive, but since that's not the case, I have
a hard time understanding the benefits of a named activation group.  The
housekeeping involved with having to manually shut down the activation group
makes them unwieldy to me.

In days of yore, when had to spin our disk platters by hand :-) it took a long time to open a file. As applications grew in size, they used more files. On a low end machine, a proven mechanism for increasing performance was to use shared opens. That is, the initial program opens all the crucial files, does an OVRDBF fff share(*YES) and then calls the menu.

Every subsequent open in RPG (whether user open or cycle open) does a pseudo-open which shares the file cursor with all the other programs in that job. One penalty for that is very tight coupling between programs. If program A is in a read loop and calls program B (like a subfile summary/detail situation) when B finished, the file pointer in A isn't where A left off: it's where B left off. So A and B need to be aware of each other's actions against the file.

Another problem was cross application support. When program A is a customer list, B is a detailed customer display and either one can be called from A/R and G/L, then the tight coupling crosses applications! The G/L system needs to be aware of the A/R system and vice versa.

At the very least, you need to code all of your programs as if they have no clue where they are after calling another program. Yuck. But it was fast, especially coupled with RETURN (no LR).

It sure would be nice if we could keep the shared files in the A/R system separate from the shared files in the G/L system. Thus, named activation groups.

*NEW/*CALLER doesn't help because you only get *NEW at the top of the menu tree. When G/L program F calls A/R program A directly (not through a menu) then A, A and B all live in the same activation group. If you had named AGs, you could readily avoid this problem by naming the G/L programs something clever like GL and the A/R programs AR.

Under this convention, F (GL) has CUSTMAST open and shared and calls A (AR). A (AR) opens its own CUSTMAST, not sharing with F (GL). But when it calls B (AR), B does a pseudo-open of CUSTMAST and share with A (AR). Both A and B remain independent of F.

Admittedly, there are apparently very few places who share ODPs deliberately outside of the odd OPNQRYF which makes this a bit academic for most everyone reading this. But it might give someone an idea of how named activation groups might fit into their future designs, especially when coupled with Larry's concept of 'common cross application code.'
  --buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.