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



An echo of one of my own from way back?
What a sensible notion. My guess is there is some ego driven desire always using a *SRVPGM is cleverer than the old way.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, 10 February 2010 6:39 a.m.
To: RPG programming on the IBM i / System i
Subject: Re: Program or Procedure

Hello Ronald,

I have to come up with a process to generate invoice numbers, using both
numeric and alpha characters. I am trying to decide whether to create a
program or procedure to housed the algorithm. In general, which run
faster, an ILE program or a procedure?

Does performance really matter?! How many times per second will you be
calling this routine? Please don't count calls in separate jobs... only
count calls within a given job. How many times per second do you expect
this to be called?

If it's less frequently than 5 times per second, it doesn't matter
whether you use a program or a procedure. Even on a very slow machine,
the performance difference will be a non-issue for you.

And in my shop, we don't generate invoice numbers rapidly in a loop.

There's no doubt that a procedure will outperform a program. No
question at all. But you really should do what makes the most sense for
your environment... what will be easiest to maintain, what will be
easiest to reuse from all of your programs, what will be easiest to
refactor if refactoring is ever necessary.

Unless your environment is extremely different from mine, program vs.
procedure performance should be a non-issue.

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.