× 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: ILE and CL, need be pointed to the right directions
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 03 May 01 20:56:15 +1000

m
Hello Slava,

You wrote:
>Seems i can not find good resource about CL ILE .
>I was trying to prototype procedure in CL and the only way i could do it is
>by using ExtPgm('program')

Use EXTPROC instead.

>Is it possible to us CLLE in expression like RPG procedures?

It certainly is possible to use CLLE procedures from RPG IV but not in an 
expression because CL has no support for return values.  

You must create the CLLE as a *MODULE object and either turn it into a *SRVPGM 
or bind it by copy to the RPG program.  Here is a bind-by-copy example:

<========== CLLE source TESTRPGCLC ==================>
             PGM        PARM(&INPUT &OUTPUT)                   
                                                               
             DCL        VAR(&INPUT) TYPE(*CHAR) LEN(10)        
             DCL        VAR(&OUTPUT) TYPE(*CHAR) LEN(10)       
                                                               
             CHGVAR     VAR(&OUTPUT) VALUE('Got it!')          
                                                               
             RETURN                                            
             ENDPGM                                            

<========== RPGLE source TESTRPGCLR ==================>
     D doStuff         PR            10    EXTPROC('TESTRPGCLC')         
     D   input                       10    CONST                         
     D   output                      10                                  
                                                                         
     D data            S             10                                  
                                                                         
     C                   CALLP     doStuff('Some text' : data)           
     C     data          DSPLY                                           
     C                   SETON                                        LR 
     C                   RETURN                                          


CRTCLMOD   MODULE(SHC/TESTRPGCLC) SRCFILE(SHC/TEMP) SRCMBR (TESTRPGCLC)   
CRTRPGMOD   MODULE(SHC/TESTRPGCLR) SRCFILE(SHC/TEMP) SRCMBR(TESTRPGCLR)
CRTPGM PGM(SHC/TESTRPGCL) MODULE(TESTRPGCLR TESTRPGCLC)                   

then CALL TESTRPGCL

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\   «»
«» Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /   «»
«»                                                           X    «»
«»               ASCII Ribbon campaign against HTML E-Mail  / \   «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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.