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



Thanks, buck, for the dialog.

Yes, activation, that's the term. Brain malfunction while overanalyzing.

I just didn't want to add 10ms 1,000 times, not that it would matter anyway. Most likely it wouldn't be that many anyway and in the grand scheme of things today with the power of Watson, nobody should worry about it.

But, I come from the time way back when my puny brain worked faster than the computer and I still consider that in my overanalyzing. I still think that the computer can't read the code and decipher it faster than I can while I'm writing code. As a matter of fact, I wonder if anybody today considers the calculation time impact of one opcode vs another. I mostly ignore it, but it's still there in the back of my memory cells.

If anybody is still reading, can you elaborate briefly on Activation Groups and when to use anything but (*CALLER)?


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, February 02, 2017 11:46 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Procedure Examples VR7.1

On 2/2/2017 10:49 AM, Duane Scott wrote:
Ok. Some clearer. But I sometimes need to sleep on things awhile when there is nobody to hit me over the head with clear examples.

Don't we all!

Situation: I have a single $ figure that would be obtained from one of three files depending on several factors, say 3 or 4. I could use a procedure to obtain the $ figure in a display program for the user benefit and in a batch process that MAY need the $ figure on each of many records but not all.

I can see a bind by reference being the best for the display program, but would it also be best on the nightly process?

If the additional 10ms of overhead is acceptable in an interactive job, how much do I care about adding 10ms to a job that is running for 10 minutes?

Once invoked, would the referenced procedure become part of the job or each instance of need be "loaded" into the job and cause additional overhead during the run?

Activation is probably the term best used when talking about service programs. There is some overhead relating only to activating a service program, but I never found it to be worth worrying about even on slow, ancient machines.

Once a service program is activated in a job, the overhead of calling a sub-procedure is exactly the same as the overhead of calling a sub-procedure bound by copy, or hard wired in the program.

If we do a one-to-one comparison of a module being bound by copy vs the same single module in an ACTGRP(*CALLER) service program, we'll find that the task of initialising pointers, allocating storage, etc is exactly the same. That is, the system needs to initialise the variables whether those variables reside in the mainline, in a sub-procedure bound by copy, or in a sub-procedure bound by reference. That task takes the same amount of time for each variable, no matter where the variable resides.

--
--buck

Try wiki.midrange.com!

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
CONFIDENTIALITY NOTICE: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact NALC Health Benefit Plan at 703-729-4677 and delete and destroy the original message and all copies.

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.