Does anybody know, if there is a way to access a DB/2 database running on an
IBM AS/400 machine?
I am in search of a way to use a LINUX Webserver providing on-line services
over WWW using data from the IBM - of course i would like to use Python
for this ... ;-)
If there is a simply way to access DB/2 with Python from a LINUX machine, i
*can* use LINUX and Python ... otherwise i neeed to use Windows NT and
Lotus Notes (what seems to work) to get the data ;-(
Thanx for any help!
Byebye,
--
Thomas Ackermann | <t...@math.uni-bonn.de> | Tel. 0228/73-7773|631369
LINUX, not Micro$oft! | Use Python - look at www.python.org
no unnecessary Graphics in HTML-Document! | GURPS, not T$R!
put your HTML stuff in a ftp-accessible directory!
finger t...@rhein.iam.uni-bonn.de for public key
> Does anybody know, if there is a way to access a DB/2 database running on an
> IBM AS/400 machine?
>
I use the Python on Win95 and the odbc module to access AS/400 databases
all the time. However, you need to have IBM Client Access (or Rumba I
suppose) on the client (which is the machine with Python). As far as I
know, this would cut out using Linux unless you wanted to use a Win95
machine as a gateway.
I can think of another way. If your AS/400 version is V3R7 or greater then
you should have IBM's AS/400 http server available. I am more familiar
with the AS/400 web server from I/NET, but I am pretty sure they have
similar features.
You could write some cgis on the AS/400 to process the database requests.
There should be a C/400 API for the web server and if you use SQL/400 to
retrieve the data, you don't have to mess with RPG. Then you could use
Python to retrieve data from the AS/400 http server.
Good Luck,
Tim Chase
First Assistant, Computer Services
The Public Library of Cincinnati and Hamilton County
Hi Tim,
at first many thanks for your fast reply!
Christopher G. Petrilli wrote in an email about "mxODBC", and i got it from
"Freshmeat". I'm still unsure if i can use it to access the database
without something like "IBM Client Access" ;-/
> I can think of another way. If your AS/400 version is V3R7 or greater then
> you should have IBM's AS/400 http server available. I am more familiar
> with the AS/400 web server from I/NET, but I am pretty sure they have
> similar features.
>
> You could write some cgis on the AS/400 to process the database requests.
> There should be a C/400 API for the web server and if you use SQL/400 to
> retrieve the data, you don't have to mess with RPG. Then you could use
> Python to retrieve data from the AS/400 http server.
I'm hard trying to work with LINUX because that is my world ;-)
Only if there is no possible way, i will try and make myself familar with
the AS/400 ...
Thanx again and
Byebye,
--
Thomas Ackermann | <t...@math.uni-bonn.de> | Tel. 0228/73-7773|631369
GNU/LINUX, not Micro$oft! | Use Python - look at www.python.org
No unnecessary Graphics in WWW-Pages! | GURPS, not T$R!
finger t...@rhein.math.uni-bonn.de for public key
> I can think of another way. If your AS/400 version is V3R7 or greater then
> you should have IBM's AS/400 http server available. I am more familiar
> with the AS/400 web server from I/NET, but I am pretty sure they have
> similar features.
>
> You could write some cgis on the AS/400 to process the database requests.
> There should be a C/400 API for the web server and if you use SQL/400 to
> retrieve the data, you don't have to mess with RPG.
In fact, IBM supply something called Net.Data with all recent versions
of OS/400; see <URL:http://www.as400.ibm.com/netdata>.
After installing it properly, you could write a Net.Data program like
the following one, and access it using httplib with something like:
http://as400sys.bigcompany.com/cgi-bin/db2www/macro/test1?name=Joe
-----
%{ This code is untested. %}
%FUNCTION(DTW_SQL) qry() {
SELECT NAME, ADDR, PHONE FROM LIBRARY.FILE
WHERE NAME = '@DTW_rADDQUOTE(x)'
%}
%HTML(test1) {
<TITLE>Test 1</TITLE>
@qry()
}
-----
You can format the HTML with Net.Data and forward it back via the
Linux web server. Once you get more complicated, you might want to
intercept the data and actually do the useful bits in Python.
--
Carey Evans http://home.clear.net.nz/pages/c.evans/
"So, do you steal weapons from the Army often?"
"Well, we don't get cable, so we have to make our own fun."
Another kind of hack would be (if the machine is running TCP/IP)
connecting via FTP on a user account with access to 1 library in
which you would place your SQL script to be executed and then calling
the SQL engine (command line utility) via RCMD (FTP remote command)
to produce output back in the same library. You could then retrieve
the result per FTP and parse/present the results as needed.
(Seems like a lot of work,though 8-)
Mail me if you want more info
Cheers
Florent Heyworth
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>Hi there!
>
>Does anybody know, if there is a way to access a DB/2 database running on an
>IBM AS/400 machine?
>
>I am in search of a way to use a LINUX Webserver providing on-line services
>over WWW using data from the IBM - of course i would like to use Python
>for this ... ;-)
>
>If there is a simply way to access DB/2 with Python from a LINUX machine, i
>*can* use LINUX and Python ... otherwise i neeed to use Windows NT and
>Lotus Notes (what seems to work) to get the data ;-(
>
> Thanx for any help!
> Byebye,
This is no help at all to you on Unix, but on Win32, Delphi AS400
provides a great way to connect. As well as using SQL, you can
directly call RPG programs and set and get parameter values, monitor
jobs, and do lots of funny tings with 'Q' in the name that I do not
understand yet. Since it is eas to write a Python extension in
Delphi, this may help someone else.
Shame about the four-figure price tag....
Andy
Andy Robinson
Robinson Analytics Ltd.
> This is no help at all to you on Unix, but on Win32, Delphi AS400
> provides a great way to connect.
On Win32, you can use COM quite effectively, if you have IBM's Client
Access. The actual connections are over normal TCP/IP sockets, so if
someone could find out if IBM have the specs available, it could
probably be done from Python on any platform.
Otherwise, we still could use JDBC (Intersolv) or JSQL (if available
for LINUX), but this is dependency again (on SUN) ... ;-(
I still can't believe how hard it is to get stuff for LINUX.
The last way seems to be using some hacked scripts to transfer
data-requests and database-replies. I'm unsure about how this could
work, but we willl see ;-)
Thanx anybody who tried to help!
Byebye,
--
Thomas Ackermann | <t...@math.uni-bonn.de> | Tel. 0228/73-7773|631369
LINUX, not Micro$oft! | Use Python - look at www.python.org
You can you java & jdbc to access data from the AS/400. Look for AS/400
Toolbox for Java in the ibm site.
Bye!
In article <874sthq...@psyche.evansnet>,
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own