× 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: Using CALLB with a Service Program
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Fri, 04 Jun 1999 14:10:02 -0600

Dan,

I can cover a few highlights, but to really understand the advantages, you will 
need to look in the reference manual.  Here is a partial list:

1. They allow you to call procedures and treat returned values as 
    data in free format expressions.  

2. Prototyped calls ensure that the caller receives data of the correct type.

3. You can specify more information about parameters.
    a) You can pass parameters by value using VALUE.
    b) You can guarantee that a parameter is not changed by using CONST. 
    c) You can return a value from a sub-procedure.

IBM recommends using copy source for your prototypes.  I agree that this 
is a good idea.  I copy source member per module and use a file name 
of qprotosrc.  Another alternative is to use source directives around the 
prototypes in your rpg module source.  You need /define, /if,  /else, /endif, 
and /eof.  I am not convinced this is better, but many people feel it is the 
way to go.

I am sure you can get lots of good information from this list.  For examples, I 
would look at News/400 and Midrange Computing's download pages.  You 
should be able to download working examples at either site.

David Morris


>>> "Dan Bale" <dbale@genfast.com> 06/04/99 11:20AM >>>


David,

>>I just wanted to comment on the use of CALLB.  Post V3R6, I have not found it
to be very useful.  Prototyped calls using CALLP are much more powerful and can
save work in the long run.  The only time I would use CALLB would be to set up
parameters used with a CALLP or EVAL.<<

Could you please elaborate on this?  How is CALLP more powerful?  And why use
CALLB to set up parameters used with CALLP or EVAL?  (I'm fairly new to the ILE
aspects of RPG-IV.)


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| 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.