×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On Thu, Jan 9, 2020 at 2:24 PM Smith, Mike <Mike_Smith@xxxxxxxxxxxxxxxx> wrote:
If I want to run a rpg pgm daily. I can put on job scheduler or on a menu. Etc.
How do I have a regular user run a python program. Can I schedule it?
You can run it or schedule it the same way you would run or schedule
any CL command.
If you don't already have a CLP or CMD wrapper for Python, then your
CL command would be QSH.
For example, earlier you said you ran your script like this:
python3 actchgdt.py 49490 20190101 20190131
From the sound of it, that was not entered at a CL prompt but rather
in Qshell or one of the PASE shells. So, to do that same call from a
CL prompt or in a CLP, you would do
qsh cmd('python3 actchgdt.py 49490 20190101 20190131')
If your Qshell path doesn't include the proper directory, you can
specify it on the call:
qsh cmd('/QOpenSys/pkgs/bin/python3 actchgdt.py 49490 20190101 20190131')
Eventually, you'll probably want to wrap it up in a CMD. Richard
Schoen has a fairly full-featured one:
https://github.com/richardschoen
I have one for myself which is much simpler (besides the QSH command,
it sets a couple of environment variables).
Can I connect to my sql server?
If your IBM i can connect to it, then you should be able to use Python
from PASE to connect to it.
John Y.
As an Amazon Associate we earn from qualifying purchases.