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



Hi John,

There is no easy way for an ILE program (or really any non-Python program)
to receive information directly from Python code, in the form of return
values or parameters.

Take a look into XMLSERVICE on the YiPs website**. Tony Cairns (IBM'er)
has created a Ruby gem/client*** making it simple to communicate with an
RPG program (including return values, parms, and stateful jobs).

Going the other direction (RPG initiating the call to <insert script
language>) isn't as seamless.

**http://youngiprofessionals.com/wiki/index.php/XMLService/XMLService
***http://youngiprofessionals.com/wiki/index.php/XMLService/XMLSERVICERuby


Aaron Bartell

On Tue, Oct 7, 2014 at 12:44 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

Aaron Bartell wrote in another thread:

but the Python I use, and which I constantly talk about on these lists,
does not run in PASE. It's a fully native application written in ILE C.

Very intriguing. Do you have an example of bi-direction communication
to/from RPG ILE?

iSeriesPython is implemented in ILE C, but that doesn't mean it's a
full ILE participant. (This was the point I was trying to make when I
challenged Rexx's membership in the ILE club.)

iSeriesPython includes an easy-to-use wrapper to call any native *PGM
object, including passing parameters to it and retrieving parameter
values from it. So, you have "bidirectional" communication, as long
as Python is doing the calling.

There is no easy way for an ILE program (or really any non-Python
program) to receive information directly from Python code, in the form
of return values or parameters. In this respect, it's much like Rexx.
The ILE program can of course call the Python interpreter via QCMDEXC,
including passing input parameters; but to get information back out
requires the Python code to write data to an agreed-upon location
(could be physical file, stream file, data area, or user space), where
the ILE program then picks it up. (One of my CS professors referred
to this style of information transfer as "parameter leaving" rather
than parameter passing.)

John Y.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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