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



I would start small. Do you do any centering of text in fields, say on a
display or printer file? If so, put the code in a service program and use
that as an example to be able to reuse code.


On Sun, Jan 5, 2014 at 3:44 PM, TheBorg <sjl_abc@xxxxxxxxxxx> wrote:

IMHO, one big advantages of introducing subprocedures to existing programs
is the fact that as long as the variables used in the subprocedure are
either passed in or defined locally then there is no chance that
coupling-related issues [such as inadvertently stepping on global values]
will arise...

;-)


"James H. H. Lampert" wrote in message
news:mailman.3432.1388168538.2717.rpg400-l@xxxxxxxxxxxx...

A couple of things on the "leave well enough alone" side:

1. It's entirely possible that (perhaps without anybody realizing it) a
program might very well *depend* on side effects of a subroutine playing
around with global variables, and if one switches to local variables,
eliminating the side effects, one could break whatever depends on them.
I've seen it happen. Usually the tipoff for something dependent on a
side effect is when it works even though it looks like it shouldn't.

2. Remember: when you have OPM and ILE calling each other across
activation groups, you have an "impedance bump," but when you have ILE
actually doing ILE things (like procedure calls) in the OPM activation
group (usually only when it's set to run in CALLER, and is then called
from an OPM program), you can end up with erratic behavior. (I try to
avoid situations like that on anything I let out of the building.)

--
JHHL

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



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.