Click here to Skip to main content
13,707,319 members
Rate this:
 
Please Sign up or sign in to vote.
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 14-Sep-18 7:04am
Updated 14-Sep-18 7:16am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v2

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.180920.1 | Last Updated 14 Sep 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100