× 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 Wed, Nov 18, 2015 at 3:23 PM, Scott Klement
<rpg400-l@xxxxxxxxxxxxxxxx> wrote:
Personally, I see a lot of value with this stuff integrated directly into my
RPG applications. My RPG code can interact directly with the spreadsheet,
so it can take different code paths, for example, based on what it's finding
in the spreadsheet and/or generate the spreadsheet differently depending on
interactions with the user or database, etc.

Buck and I already went through this. If you *already* have a large
amount of business logic in an RPG program, and you want to augment
that existing program so that it writes to an Excel file, then yes,
there is not currently a better way than JNI-based POI wrappers.

Also, if you need to interact with the user via green-screen display
files in the midst of processing Excel files, then you really have no
way around RPG.

But for any *new* application which doesn't use display files, there
is no reason you can't use another (often better suited) language.
Don't bother with the intermediate file, just do EVERYTHING in that
other language. It's NOT significantly more complex. In fact, for
typical Excel-reading and Excel-writing applications, using Python for
everything (including database I/O) is significantly simpler than with
RPG. The more complex the logic and code paths, and the more complex
the data structures, the bigger Python's advantage is over RPG.

As for Darryl's issues with not being able to figure out, seemingly, every
single step (can't figure out installation, can't figure out classpath,
can't figure out garbage cleanup, etc) Frankly this is because Darryl is a
bit out of his depth. He's in a situation where he has to learn all of this
for the first time for this project, and that's why he's having so many
problems. I can't see how switching to Python would resolve that -- either
way, he has to learn a whole new environment. In that case, he'd be here
complaining about installing Python, learning how to import Python
modules/add-ons, etc, instead of the Java ones.

But there are fewer places where you can hit snags in Python. There
aren't multiple versions of POI. There aren't classpaths. There aren't
garbage collection issues. Until recently, there weren't different
versions of Python to worry about (you could always just pick
iSeriesPython 2.7 for any IBM midrange OS from V5R3 up to 7.2).
Installation of iSeriesPython is really simple. So simple that *I* can
do it, and do it in just a few minutes.

There is one significant potential snag with Python that isn't present
with RPG-wrapped POI, and that is that you do have to learn some
Python. To some, that is daunting. I happened to find Python very
easy, but of course that's going to vary from person to person. I will
say that more and more universities are choosing Python as their
introductory programming language, especially for non-CS majors.

But my whole point in presenting Python as an option is that if you
are starting from scratch with both Python and POI, I contend that you
are likely to be able to get up to speed faster with Python than with
POI.

The big disadvantage of Python, imho, is that you can't integrate it with
RPG like Java.

Right, this is what Buck and I went over.

You can't call a Python method from an RPG prototype,
your RPG code cannot 'react' to things happening in the Python environment

Yes, but my proposal is not to have RPG involved at all, and just do
everything in Python. Then you can react very easily.

Or, go the other way: With iSeriesPython, it is very easy to call any
*PGM object, with both input and output parameters. So if there are
certain pieces that you want to accomplish in pure RPG (or ILE C or CL
for that matter), you can do that, and incorporate it into your Python
program.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.