×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




The following example shows how to call RPGLE from CLLE passing the
parameter.


CL Program:

Pgm

  Dcl &Nbr         *Dec      (    2  0 )   ( 21 )
  Dcl &NbrA        *Char     (    2    )

  ChgVar     %Bin( &NbrA ) ( &Nbr )

  Call       RPGPgm     ( &NbrA )


RPG program:


D EntryParms      PR                  ExtPgm('RPGPGM')
D                                5I 0
D EntryParms      PI
D  Nbr                           5I 0

or if you want to use *Entry PList

D Nbr                            5I 0

C     *Entry        PList
C                   Parm                    Nbr

If you're calling CLLE from RPG, you accept the parameter as a 2-byte
character and use %Bin built-in function the reverse way to convert to
decimal. For example,

Pgm          ( &NbrA )

  Dcl &Nbr         *Dec      (    2  0 )
  Dcl &NbrA        *Char     (    2    )

  ChgVar     ( &Nbr )      ( %Bin( &NbrA ) )

Hope this helps,

Gary Guthrie
Senior Technical Editor, iSeries NEWS



Gurrieri Fabrizio wrote:
>
> How can I pass a character 2 byte long parameter as an integer in a CLLE???


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.