not an issue, rather a question about passing parameters between python & COBOL/RPG
Issue #121
resolved
Hi,
I know how to pass parameters from COBOL/RPG to python (if the caller is an RPG/CBL pgm) and how to call RPG/CBL from python when the caller is python, but what is the best way to pass back a return param when CBL is calling python.
Of course, I can write the result to a data queue or to a file from python & in the CBL/RPG retrieve the results like that but I am pretty sure there is a better way.
Thank you,
Roger
Comments (2)
-
-
- changed status to resolved
While there's lots of avenues to explore here, I'm not sure this issue is best suited for your needs without more discussion. Please reopen with any further questions if you have them, or join the community chat. Thanks!
- Log in to comment
The use of a data queue is actually a popular way to do this.
An arguably better way would be to use HTTP REST to communicate to submit work to a Python job.
There are the Axis client APIs which should work for this, but my knowledge of COBOL is elementary at best. I suspect it’d be easy to use these same APIs from COBOL but can’t advise how. https://developer.ibm.com/technologies/systems/articles/i-send-receive-user-defined-soap-rest-messages-trs/
I’d recommend joining our community on Ryver ( http://ibm.biz/ibmioss-chat , join first at http://ibm.biz/ibmioss-chat-join ) to hopefully get a more diverse set of ideas for accomplishing this.