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



Problem is a lot deeper than that. A program has a single point of
entrance, a service program has multiple. There are ways to get around
this but all are about as ugly as they get. If service programs are
falling out of favor, how does one design with multiple entrance
points? If multiple small procedures are not being used, it points to
a design failure. Service programs are not being used correctly.

Also, program calls can be made using prototypes without fixed format
code. You can specify CONST on the parameter but their is nothing in
the receiver to enforce it.

d MyProgramCall...
d pr ExtPgm('MYPROG')
d MyVariable...
d 7p 0 Const

/Free

MyProgramCall(3 * WorkVar);

/End-Free


On Mon, Jan 26, 2009 at 9:04 AM, <rob@xxxxxxxxx> wrote:
In simple programming terms the problems that I have with external
programs versus subprocedures in a service program are twofold.

One, I can't do stuff like this in RPGLE
RealVariable=MySubprocedure(3 * WorkVar);
I have to something like this:
TempVar=3 * WorkVar;
call MySubprogram
parm TempVar
parm RealVariable
Plus I have to convert the above into fixed format.
Also, I have to be concerned with whether or not the subprogram mucked
with TempVar since subprograms don't support CONST.

Two, Since I cannot use the return variable capability of the above I
cannot convert the subprogram into a UDF for use by SQL as in:
http://faq.midrange.com/data/cache/185.html

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
<jvoris@xxxxxxxxxxx>
To:
"midrange-l" <midrange-l@xxxxxxxxxxxx>
Date:
01/26/2009 10:26 AM
Subject:
Binding directory question
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



We have both types of programs in our shop, and for us, service programs
are now falling out of favor. Faster development and efforts in
testability are our primary concern.

I understand the push by IBM and others toward Binding directories and
Service Programs. Yes, they are efficient.

But for the programming behavior, where you are retrofitting and keeping
the behavior consistent, it is extremely hard. Managing binding is an
added level of complexity that we do not see advantages to, and our
users see little value in us addressing. (The ongoing "technical debt"
of retrofitting and changing working programs is not something the user
community wants to pay for now.)

Because of good design and no copied code, where we have our functions
are NOT defined in multiple places, but in one place only, we really do
not care if it is invoked as an EXTPGM or within Service Programs. Not
when response time is sufficient.

Is there a response time problem with your applications? Can you see a
payoff in re-wiring them differently? I believe you are taking on short
term risk for little payback later.

But the real question I think you should be asking is, Do the new and
existing applications have automated tests to ensure code is written to
match requirements? And tests to prove the change did no harm, that we
can prove anything we change is behaving the same way? The failure to
build these regression tests into system i code keeps us out of the
Agile movement and from any true improvements in our codebase. Until we
change our programming habits in this way, it is all window dressing.

In summary, I feel IBM and others push too hard into the area of binding
and put too little effort into the area of testability.

I am yet to be convinced that they are a "drastic" improvements from
the plain old modular programming practices we institute, in the sense
that as long as we have one program to handle one thing, and we have
automated tests in place that prove the functionality again and again,
we should be modify or refactor it without tests.

So I too would be interested to hear about the experience and ROI that
rewriting and/or re-wiring the application gives you. I would love to
be proved wrong.


from: David FOXWELL <David.FOXWELL@xxxxxxxxx>

Jerry, I'd like to hear how you get on, it seems like we are just a step
behind you.

Birgitta,
I'd be very worried about converting everything at once.
After having changed from 1 big bound pgm to one smaller pgm bound to
several srvpgm, won't there be differences in behaviour?
What about things like Static variables, files staying open, etc?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.