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



On Fri, Jun 1, 2018 at 4:27 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
I wrote some proof of concept code in Python - it was surprisingly quick
to do with the requests library. That Python works on my 7.3 machine in
PASE.

Yeah, I consider Requests one of the "killer apps" in Python. (I know,
technically it's not an "app" but you get the point.)

Now, I want to shoehorn that into my existing green screen inquiry
program. I would like to do this:

RPGLE -> search criteria -> Python -> UUID -> RPGLE
RPGLE -> UUID -> Python -> binary file -> RPGLE
RPGLE -> MIME/text/binary file -> Python -> UUID -> RPGLE

Is this a fool's errand?
Should I just learn how to do the equivalent on the green side?

Fool's errand? I would say that depends. If you're willing to think in
terms of "information flow" rather than *parameters* per se, then it's
fine.

The simplest and most straightforward way to get information out of
called Python code is for the Python code to "leave" it somewhere to
be picked up by the caller. (I use this verbiage to contrast with the
idea of "passing" information directly back to the caller.) The most
natural choice, from the Python side, would be an IFS stream file. But
it should be fairly easy to leave the information in a database table
or other QSYS.LIB objects (via iToolKit).

I'm a 40-year RPG programmer, and I felt more comfortable trying this in
Python instead of... I don't even know what options are available on
green screen, and I'm afraid that doing the research to find out will
take longer than proofing it in Python did.

Feels weird, man.

This is one of the best testimonials I've heard regarding Python on the i.

John Y.

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.