|
> From: Tony Carolla > > As I understand it, each time you call a program that was created with the > ACTGRP(*NEW) specified in the header, a new activation group is created > for the job. This can be costly, if in your example you have three > program calls, that means that three new activation groups will be > created, one for each program, each time each program is called. If > you call the same program three times, you get a new activation > group created all three times. > > This can lead to slow runtimes. Tony's right, and let me clarify my position on this: the original post was talking about a program that is sometimes called from the menu and sometimes called from another program. Usually this happens when the program is called in response to the user hitting a function key in another program (for example, one inqruiy allows you to hit F15 as a shortcut to another inquiry). If the program is ONLY called in response to a user action (such as selecting a menu option or hitting a function key) then the overhead of extra activation groups should not be a problem. There are rare occasions, though, where a program is sometimes called as a display file program, and sometimes called as a subprogram to do something. I remember an allocation program that could be called standalone to maintain a single allocation or could be called over and over again by order entry or shop floor control to maintain all the allocations for an entire order. In this case, creating a new AG for every line item could indeed be costly. However, that situation is pretty rare, and in fact you can usually spot such programs because the display file is defined with USROPN in the file specification. So, my rule of thumb is this: A program called from a menu that does NOT have USROPN in the display file specification is usually a good candidate for *NEW AG. Joe
As an Amazon Associate we earn from qualifying purchases.
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.