AS/400

Simon Brunning SBrunning at trisystems.co.uk
Fri Apr 26 05:06:55 EDT 2002


> From:	terjej at mailandnews.com [SMTP:terjej at mailandnews.com]
> I am trying to write some Python code that moves info from Excel into
> AS/400 throuhgt a display program called Rumba. (www.walldata.com)
> Basically what I want it to do (short version) is that I go to a cell
> in Excel, copy that cell, changes to the Rumba window, goes to
> coordinate x,x pastes the number there. Then goes back to Excel, gets
> a new number, goes to Rumba, changes screens by typing F12, enters
> info from Excel again in coordinate x,x. It is more to it than this,
> but if I can figure out this, I can figure out the rest.
> 
> The Excel part I have no trouble with. The AS/400 part is a little
> worse. Do you know some additions I have to install with Python? Where
> can I find some info about the functions that moves around on the
> AS/400 display and so forth. I have searched in google and on
> python.org but haven't found much. I can't be the only one that needs
> to do something like this? Thanks in advance for all answers and all
> pointing in the right direction so I can find out more info...
 
One possibility - I believe that Rumba is COM scriptable. If so, there
shouldn't be any problem driving it with win32all. (If Rumba *isn't* COM
scriptable, check out Reflection from WRQ, which is *definitely* COM
scriptable.)

But that's not how *I'd* do it. I'd bypass 5250 altogether. I'd write the
data direct to the database on the iSeries if at all possible. If you have
an ODBC driver for your iSeries, then you could write the data up using
mxODBC.

An alternative would be to use the Java based Jython rather than CPython.
This way you could make use of the *excelent* JTOpen Java package. This
package includes a JDBC driver, native database access, and classes to drive
just about anything that you can think of on the iSeries. Jython can't use
win32all, so you might have trouble with the Excel file, but if you saved
your data in CSV format, you could read that OK.

If you *can't* write direct to the database (perhaps you have to put your
data through a complex RPG program), you could make the calls via JTOpen.

Another thing to look at - Per Gummedal's port of Python to the iSeries at
<http://home.no.net/pgummeda/>.

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.





More information about the Python-list mailing list