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


  • Subject: RE: CALL, CALLP, & CALLB
  • From: Joel Fritz <JFritz@xxxxxxxxxxxxxxxx>
  • Date: Fri, 26 Feb 1999 11:06:48 -0800

If you go to the IBM AS/400 site and (gasp) look at the ILE RPG/400
Programmer's Guide, 
and AS/400 ILE Concepts V3R7 you'll get a lot of useful information that is
presented, particularly in the ILE Concepts book, in a surprisingly readable
manner. Bryan Meyers' _RPG IV Jump Start_ is a good source of basic
information. 

They both must be used in RPGIV programs (source type RPGLE, created with
CRTBNDRPG or CRTMOD and CRTPGM.)
CALLP can be used in place of CALL for regular dynamic calls, as well as to
call bound modules, service programs, or internal subprocedures.  CALLB is
(already) obsolete, but can be used to call bound modules and, I believe,
service programs using the same syntax as call.  

One good argument for using CALLP exclusivelly is that it does type checking
at compile time on the parameters that are passed to make sure they match
the type of the parameters expected by the called routine.  Another is that
if you write RPGIV programs, it's the only call opcode you will need to
learn--you can do everything with it.

A bound (static) call will be faster than a dynamic call, but you need to
bind the called routine to your main program.  In an interactive program
where you're calling the routine once or so to put a screen, as long as you
leave LR off in the called routine (and do the necessary housekeeping when
you shut down), a bound call probably won't give you much of a boost.  In
batch programs that call the same routines many times, you'll probably see
real improvement.  

The whole subject of how (and why) to convert existing programs is a complex
question.  I'm sure there are service program and module proponents out
there.  One thing that's true no matter which route you take, is that there
are a lot of housekeeping issues you need to solve in order to keep
maintenence as simple as possible.  When you get a call at 2AM you want to
be able to find all components of a program quickly and easily.

###########################################
The above is my personal opinion and is not intended to represent good
programming practice or the product of a sound mind.

Joel Fritz 

> -----Original Message-----
> From: Patrick Shrader [mailto:pshrader@foodcity.com]
> Sent: Friday, February 26, 1999 8:34 AM
> To: RPG400-L@midrange.com
> Subject: CALL, CALLP, & CALLB
> 
> 
> Hello everyone. 
> 
> I am trying to distinguish the differences in the CALLP & 
> CALLB commands
> vs. the CALL command in RPG IV. I am trying to locate a web site or
> document that summarizes the differences between these and to 
> give me some
> ideas as when to use these.
> 
> We use a LOT of CALLs to subprograms (verifying account 
> numbers, returning
> employee information, returning item file information). I 
> assume that both
> CALLP and CALLB will be faster than a CALL. Does anyone have 
> any hints as
> to best convert the subprogram to a module, and what 
> prototypes should be
> used for this?
> 
> And if you know of a good website with code examples that are easy to
> follow, please let me know.
> 
> Thanks in advance.
> 
> 
> 
> ------------------------------------------------------------
> Patrick Shrader       
> pshrader@foodcity.com
> Systems Analyst
> K-VA-T Food Stores/Food City
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * *
> * This is the RPG/400 Discussion Mailing List!  To submit a 
> new         *
> * message, send your mail to "RPG400-L@midrange.com".  To 
> unsubscribe   *
> * from this list send email to MAJORDOMO@midrange.com and 
> specify       *
> * 'unsubscribe RPG400-L' in the body of your message.  
> Questions should *
> * be directed to the list owner / operator: 
> david@midrange.com          *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * *
> 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.