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



> From: Buck Calabro
>
> NAG - Named activation group
> DAG - Default activation group
> Scope - How long a variable/program activation/OVRxxx lives

Buck, you left off one very important option for AG: *NEW.  While you might
be concerned about overhead with AG *NEW, there is one very solid, powerful
use for it, which has to do with programs that do not turn on *INLR.

Most of my tools consist of driver programs that call other programs.  The
called programs don't set on *INLR.  In the past, the only way to clear
those called programs was to end the job, RCLRSC, or have my own "registry"
API.  Programs would call this API on startup to "register" themselves, and
at shutdown time, the registry API would be called to shut down all the
registered programs.

While this technique works, it is no longer needed in the ILE environment.
Instead, I can compile each of my called programs into a module, then bind
them all into the driver program, which is then compiled with ACTGRP(*NEW).
All bound modules run in the same activation group as the driver, and when
the driver ends, all the programs are cleared from memory.

This is a very nice way to take a "baby step" into ILE programming.
Eventually, I suppose those programs can be rewritten as procedures in a
service program, but I'm not really sure how much that buys me.  With the
*NEW AG technique, I can take advantage of *INZSR to do first-time
processing in my programs (such as caching) while at the same time, I know
the programs will be cleaned up automatically when the driver program ends.
I'm not sure how I would be able to do the same thing with a subprocedure,
and especially with a service program.

Joe



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.