We are trying to get a process set up where OPS calls a shell script (to set environment variables) that then calls a Python script.
The shell script and python script work as expected when invoked directly.
However, when invoked from OPS the process hangs and has to be canceled to get it to stop.
Is there something special that needs to be done to call Python from OPS?
OPS/MVS
Some USS scripts may hang if running in the foreground.
Another possible cause is related to bad syntax in the arguments passed to the script. A known issue is caused by the wrong usage of quotations in the arguments.
Running the script in the background solved this problem.
To run a script in the background an ampersand "&" must be added at the end of the command:
USSCMD = "/u/uxxxxxxx/script.sh &"
ADDRESS 'USS',
"USSCMD COMMAND('"USSCMD"')"
The OSF USS servers are intended to execute relatively short USS commands. While long WAIT values may be used, we strongly recommend that the WAIT value is not set higher than 600 seconds (10 minutes). Long-running transactions should be run in the background by placing the ampersand (&) symbol at the end of the USS command. However, doing so results in the command output not being returned to the OPS/REXX EXEC that issued the command. Using the OSF USS servers to execute long running transactions may result in other automation that is time-critical not to execute in a timely fashion, because all of the USS servers may be busy executing long-running work. Executing long running transactions may also result in the OSF USS execute queue filling up, which may result in ADDRESS USS failures and failing automation.