× 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 never thought of a prototype call because the CL has no parameter
interface. But when I was thinking about it after Simon replied, I
realized the compiler doesn't know about any external objects at this
stage. It only knows about the defined interface through the prototype. 

The fact that there is no PI declaration in the CL doesn't matter to the
RPG compilation.

The only clue I had, as I said was the vague reference to a bound call.

The documentation shows how to call an RPG procedure in a CL, but
doesn't seem to show the reverse. Lots of references to C code though!

Perhaps it's just my method of searching the archives which is wrong.

This is an interesting point. How do people search for answers? And what
is the list of references they use? Are there better techniques I could
use in the search string for midrange for example?

Thanks for helping.




-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Richter
Sent: Monday, 20 March 2006 1:39 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: CL Module Question.


On 3/18/06, Mike Pantzopoulos - (H/O) <mpantzopoulos@xxxxxxxxxxxxxxxx>
wrote:
> Thank you Simon. Comprehensive and erudite as usual.
>
> I'm now having problems with point 3 of your answer. I've spent about 
> 3 hours scanning ILE Concepts manual, MidRange Archive and the iSeries

> News site. To no avail. How do I invoke a CL procedure from an RPG 
> program?

Mike,

the ILE gods are making this way too complicated!

In the rpg you prototype the cl program:

  d test20c    pr                         extproc('TEST20C')
  d InText                                    50a  const

then in your rpg code you call the prototyped procedure:
         test20c( 'hello from rpg program' ) ;

create the rpg module:
  CRTRPGMOD  module( test20r )

last step, CRTPGM the rpg program. In the list of modules to create the
program from, specify the rpg module and the cl module:
  CRTPGM PGM(TEST20R) MODULE(TEST20R TEST20C)

run the program and move on to learning how to write sql procedure code
that can be moved to the p5.

-Steve


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.