Running an AS/400 CL program via ODBC

Carey Evans careye at spamcop.net
Wed Jun 6 04:59:30 EDT 2001


"Aaron Fransen" <aaronf at nospam.telusplanet.net> writes:

> The other problem is where the callproc procedure would really be handy,
> which isn't implemented in the Win32 stuff from ActiveState. I actually need
> to (a) call a program, (b) give it parameters, and be able to (c) read back
> two of the parameters, which the AS/400 program would have modified.

To do this via ODBC, I would use an SQL "DECLARE PROCEDURE" first to
set the types of the parameters, and whether they're IN, OUT, or
INOUT.  I don't think I ever actually got OUT or INOUT working with
our AS/400 and the standard odbc module, though.

There's a couple of options using OLE/COM/ActiveX/whatever to call
programs on the AS/400, using the free parts of Client Access Express.
You can use the "standard" ADO/OLE DB support, or go direct to the
Client Access ActiveX Automation APIs.  I might be able to find some
examples of this, but I can't test it at the moment, since I run Linux
here at home.

You could also install Java, Jython and JTOpen, and use JDBC.  I
haven't had any trouble with that approach.

-- 
	 Carey Evans  http://home.clear.net.nz/pages/c.evans/

	    "Quiet, you'll miss the humorous conclusion."



More information about the Python-list mailing list