×
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 agree, there is an analogy with driving the Porsche to the local 7/11 just down the block.
I have experience with developers whose RPG is mostly embedded SQL, even to the absurdity of replacing some of the RPG built-ins.
Likewise, there are those obsessed with commencing development by creating yet another *SRVPGM even though most of the events are related only to that one application.
In my opinion the *PGM object often ends up as a verbose procedural SQL mess that only the developer can decipher or just a series of service procedures that call other service procedures that make following the logic a detective exercise.
Peter
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta
Sent: Saturday, 9 February 2013 3:16 p.m.
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: CallP Versus Program 'CALL'
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.
As an Amazon Associate we earn from qualifying purchases.