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



John,

With procedures, encapsulated in service programs, you can organize your
code with much more granularity, and with much more control.

One simple example, which happens in every big code base, is, for example,
a contraint which is nothing more than something like the following
pseudocode: if CustCredit > CustOrdered then "allowed" else "not allowed".

This little piece if business logic is just one line, but an important one
on which whole careers are built ;). Also, it *will* change, tomorrow or
next year, and again. But you have to find it first, before you can change
it.

How would you implement this? You could use a copy member, which is nasty.
You could implement it as one OPM program. You really could, but what about
those 100 other contraints, which also consist of one or two lines? You
would get about 100 OPM programs in library "CONSTRAINT" or something.

But using one service program (one object called CONSTRAINTS), gives you
much easy maintainance and control.

Of course, you can do everything with copymembers or OPM programs, or even
RPGII, or brainfuck (http://en.wikipedia.org/wiki/Brainfuck), or just zeros
and ones even. It's just more work. And maintenance hell.

You can create your own programming system, like one program (the
dispatcher) which takes a function name etc, but IBM has allready done all
that for you, with the ILE and tools. It's late, very late, we already had
that since the 60's, nothing new, but 'm glad the IBM i community can now
use a "real" classical programming language with modules/libraries and
procedures.



On Mon, Jul 21, 2014 at 2:16 AM, Jerry Adams <midrange@xxxxxxxx> wrote:

Similar experience with pricing. But at an earlier employer there were
sixteen [16!] programs that created UPCs. I was tasked with the job of
modifying them. Our program base was all RPG IV (no ILE) so I suggested
writing a single service program; at least that way, when future
maintenance was needed, we only had to go to one place. That suggestion
was
86ed because neither I nor anyone else in the company had ever written a
service program.

But, admittedly, a service program wasn't 100% required; a simple CALL to a
program would have sufficed. Even that option was nixed.

Jerry C. Adams
IBM i Programmer/Analyst
I'm not getting older. I'm just becoming a classic!
--
NMM&D
615-832-2730

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ken
Sims
Sent: Sunday, July 20, 2014 4:37 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: The value of ILE

On Sat, 19 Jul 2014 23:32:55 -0600, Alan Campin <alan0307d@xxxxxxxxx>
wrote:

The example that I always use was the first service program that I
wrote in 1994..

Our company had an extremely complex method of calculating prices. It
took a lot of logic to come up with a price. What had been done
previously was the usual RPG III thing of putting the same logic with
different implementation in three different programs. To make a change
meant going to three different programs and changing three different
versions of the logic and retesting everything. Even the simplest
change was a mufti-week project.

Interesting. My first service program was also a pricing service program.
And it's still very much in use.

Ken
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.
--
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.

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

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.