• Subject: Re: Programming Performance
  • From: "James W. Kilgore" <qappdsn@xxxxxxx>
  • Date: Wed, 27 May 1998 01:37:33 -0700
  • Organization: Progressive Data Systems, Inc.



Erick wrote:

> Recently, I read an article that suggested that using a return in an RPG
> program would improve system performance simply by staying resident in
> memory during the job stream.
>
> If this is the case, would all the data areas and work variables have to
> be reinitialized?

Short answer .... yes.

Longer answer ..... it depends.

It depends upon how the program is structured upon initiation/exit.  Is there an
indicator or variable that gets set upon initiation which controls a "first
call"?  This may need to be cleared upon doing a return instead of LR.

Basically, upon return, the variables start out at the value of last exit.
Unless the sweeper has come in to mop up afterwards or you send them it first 
...
you pick.

My personal preference has been to write code assuming that the slate needs to 
be
cleaned before the program goes to work.  (takes into account slobs that may 
have
been there before me <g>) Some like to clean up before they leave, some like to
clean up before they start to work.  Sort of like a DOx preference .... what 
ever
floats your boat .... just be consistent.
begin:          vcard
fn:             James Kilgore
n:              Kilgore;James
org:            Progressive Data Systems, Inc.
adr:            311 31st Ave SE;;;Puyallup;WA;98374;USA
email;internet: qappdsn@ibm.net
title:          President
tel;work:       (253) 848-2567
tel;fax:        (253) 770-1424
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].