|
On Fri, 28 Dec 2001, Andrew Borts wrote: > > From the web stuff I've been doing, I adopted the following standard; > > Named activation groups ALWAYS - never *NEW - according to the little > chart made by IBM about performance & the HTTP server, named activation > groups were 30% faster then *NEW activation groups. > You know, I hate it when people say things like this. Please don't make blanket statements like "Named activation groups ALWAYS - never *NEW". Like everything, the different ACTGRP() settings are effective when used in the correct scenario. Likewise, when used incorrectly, such as calling a *NEW from a web server, something will suffer. In other words, use the right tool for the job. IBM's web server has a number of jobs waiting for web requests. These jobs don't end, they just serve requests. When they end up calling your program over and over and over again, OF COURSE '*NEW' is going to be slower. Just like the name implies, it creates a NEW activation group each time. The named activation group only does so the first time. Obviously, if it has to do something extra each time it runs, it's gonna take longer. However, when you're NOT calling your program over and over again repeatedly, ACTGRP(*NEW) is much easier to manage than named actgrp's are. You don't have to worry about keeping your activation group unique across all of the software you buy/write/install. You don't have to worry about different programs in different actgrp's calling the same routines, and getting the same copy when it's not appropriate to. You don't have to code the extra RCLACTGRP, or worry about a bug that might cause it to not be reclaimed. The key is, only use ACTGRP(*NEW) in a situation where you want the activation group to be reclaimed as soon as it ends. In the situation posed by Joe Pluta, where he wanted to have a "clean up" routine that went through and closed out all of the programs running, ACTGRP(*NEW) is ideal. You just have the "main" program be ACTGRP(*NEW) and all the sub-programs/service programs be ACTGRP(*CALLER). Then it automatically cleans itself up.
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.