Search code examples
pythonibm-midrange

Navigate through as400 using python


I want to automate some tasks within as400 (I think it's referred to as IBM i). I managed to get some stuff done using autohotkey and directly navigating through the interface. This works alright but is far from optimal.

I wish to do some more advanced stuff now using python, the problem is, I don't know where to begin. My first goal would be to be able to navigate the as400 window through python, once I am there, I feel confident that I can work out the rest.

I tried to look into some resources but I don't really understand them like https://www.itjungle.com/2019/06/10/guru-getting-started-with-python-on-ibm-i/.


Solution

  • If you are thinking in terms of "navigating the window" (i.e. going to a screen, pressing a function key, entering some text, choosing a menu option, etc.) then running Python (or anything else) directly on the IBM i isn't going to work.

    Theoretically, you could use Python on your PC to interface with TN5250J or EHLLAPI, which would give you more capabilities than AutoHotkey; but this is rarely done, and there aren't any turnkey solutions for doing this in Python.

    If you want to leverage Python on your IBM i then you'll need to think in terms of working directly with the files and other objects (as you would do with CL, RPG, or COBOL), or with the database (as you would do with SQL).