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



On 2/8/2013 11:19 PM, Alan Campin wrote:
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 don't think CALLP means what you think it means. Unless you're returning a value from the procedure, CALLP is exactly the same as calling without CALLP.

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.

It depends on what you're doing. I've written articles on just this topic. For the most part it comes down to the parameter list and the ability to return a value. For a simple interface between two programs, the old-fashioned call can work just fine.

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.


I beg to differ. A procedure call may be faster than a program call the first time (although if the procedure isn't bound at compile time, I don't know how much faster) but once the pointer is resolved I guarantee you it's not 1000s of times faster.

Seriously, I only got into this conversation because I hate absolutes. Generally speaking I like procedures better than OPM-style parameter lists, but program calls are simple and easy to use and like any other tool they have their place in the world.

Joe


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.