× 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 guess it depends on how you define obsolete. CALLP was a method of
calling programs and procedures in fixed format. IBM replaced it with a far
superior method of doing the calls. I would consider it obsolete. It can
still be used but I sure would not recommend it for any new development.

I agree structurally program calls still work but service programs bring a
whole new dimension to development and a completely different way of
thinking. You simply cannot do with a program call what can be done with a
service program and multiple procedures or at least not without creating
what I would call a mess.

As far as performance, even using programs with the MAIN keyword, no RPG
run-time and procedures you can make thousands of service program procedure
calls in the time it takes to make one program call. Multiple entrance
points( Procedures), type validation and blazing speed, why wouldn't you
use service programs for new development? If you continue to use program
calls, you are stilling continuing to lock you mindset into monolith
programming.


On Fri, Feb 8, 2013 at 7:16 PM, Joe Pluta <lists@xxxxxxxxxxxxxxxxx> wrote:

At the risk of being pedantic, CALLP is not obsolete; it's just optional
in free format RPG, much like EVAL. If you're not coding free format,
you have to use CALLP, and you can actually still use it in /free.

As to moving everything to service programs, that's kind of like moving
everything to SQL. It's an option, but not necessarily required or even
desired in every case. There's nothing structurally wrong with a
program call; the operating system does it pretty well, especially when
you don't set on LR.

Joe

If you talking about performance of CALL vs CALLP both making a program
there should be no difference at all. CALLP is just interpreted by the
compiler to generate CALL or CALLB code based on what you are calling.

Having said that, you should not be doing either one. CALL, CALLB and
CALLP
are all obsolete. What you should be doing is prototyping the program
calls.

d CreateBFile...
d pr ExtPgm('ABCPGM')
d PR_CustomerNumber...
d 8a Const
d PR_Amount...
d 7p 2 Const
/Free

CreateBFile('A0001':
12.50 )

/End-Free

And, of course, if we push it up to the next level, if we are building
new
code we shouldn't be doing program calls. We should be encapsulating our
business logic in service programs and making procedure calls.


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