[Stackoverflow] [Progress OpenEdge ABL] How to get the output of a script running on remote machine via gsclient?

Status
Not open for further replies.
R

Roman

Guest
I have two machines, connected via telnet, PC1 and PC2.

I'm running on PC1 a progress-4gl script stored on PC1 via a GSclient from PC2.

That script runs a batch script which launches a python script to run on PC2.

That python script runs as intended, and then returns an output which is needed for the rest of the code in the progress script on PC1, the so-called "parent script" I guess.

How can I return that output from the python script on PC2, to the batch script on PC1, and back to the "parent script" on PC1?

Currently, I'm using OUTPUT THROUGH on the "parent", to run the batch. On the batch I'm using GS_exec.exe to run the python script on PC2.

progress.p:

def var script_to_run as c.
script_to_run = "path/to/script/to/run/on/PC2/script.py".
output through value("path/to/exe_python.bat " + script_to_run ).


exe_python.bat:

@echo off
set INFILE=%~f1
C:\GS_UTS\GS_Exec.exe "python %INFILE%"


script.py:

codecodecode...
return output


Expected result would be: progress code runs on PC1> batch runs on PC1> python code runs on PC2> output from python code returned to batch on PC1> returned to original progress code.

Actual result is: progress code runs on PC1> batch runs on PC1> python code runs on PC2> output isn't returned anywhere, and the original code just runs without the wanted output after the completion of the python code.

Continue reading...
 
Status
Not open for further replies.
Top