× 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: Can I call a CL program from RPG and pass parms back and forth?
  • From: bmorris@xxxxxxxxxx
  • Date: Fri, 8 Sep 2000 21:35:02 -0400
  • Importance: Normal


>Date: Fri, 8 Sep 2000 16:40:06 -0700
>From: Ken.Slaugh@cm-inc.com
>     Calling CL programs from RPG is quite easy with one exception...
>Numeric parameters. Consider moving your fields into a alphanumeric field,
>using CHGVAR to format the numeric CL variables. Then use CHGVAR to
replace
>the original passed alpha variables. Other than that you will have to
>define you numerics as 15.5 (15 digits with 5 decimals) and then pass
them.

Ken, this is not true.  Calling CL from RPG with numeric parameters works
fine as long as the RPG parameter is packed, with the same length and
number of decimals as the CL expects.  (This is true for a program in
any language calling CL, including a CL program.)

When you use character fields to pass numeric parms to CL, how do you
handle negative values?

(The 15,5 thing is about calling programs from the command line, not
program-to-program.)

Barbara Morris


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