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



James wrote:
>
>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.


Another thing to consider is a 'shutdown' parameter in the parm list.  If
the value of SHUTDOWN = 'NO', the program will do a return with LR -off-.
The program stays resident, files are open, and the next call will be
quicker.

If  SHUTDOWN = 'YES', the proram will turn on LR and quit.

This will let the progrma stay open when needed, and shutdown gracefully
when you're finished with it.


James' comment about cleaning up before or after you execute reminds me of
a somewhat on-topic philosophical note:

There was a girl's school dormitory that had a bathtub.  There was a
problem with a ring around the tub from time to time.

Finally a sign appeared over the tub:

        "An optimist cleans the tub -after- she uses it.
        A pessimist cleans the tub -before- she uses it.
        A -Lady- cleans the tube before -and- after she uses it."

--Paul E Musselman
PaulMmn@ix.netcom.com


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

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