Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am looking to talk to AS400 via Python. I am struggling to connect to AS400 using the import pyodbc library. Can anyone share the snipped code with me?

I have tried to use
Telnet connection to an AS400 system via telnetlib (Python)

What I have tried:

I have tried the above telnet library
Posted
Updated 14-Sep-18 7:16am

1 solution

If you're looking to access the data on the 400 you need a data provider. IBM's Client Access provides one for .Net and for ODBC. Since you're probably not able to use the .Net one I suggest you use the ODBC one.

From your point of view it's like connecting to DB2.

Make sure the Database TCP server is running on the 400. That is done via the STRTCPSVR command.

Just understand that the AS400, from a database point of view, is just like any other database. Treat it like you would SQL Server, Oracle, etc.

Mike
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900