I was thinking about how convenient it would be if I could call z/OS system services, e.g. IEFSSREQ, from within a python program. I’ve been thinking about it and doing a little research, and I think it would be possible to do this… But I was hoping I could get some advice from Rocket or other users of this forum before I proceed any further.
Here’s the approach I was thinking of taking…
CPython (which I believe the Rocket version of python is a port of) can be extended with “extension modules” that are written in C. I was going to use this documentation for guidance:
Next, the z/OS XL C compiler supports a #pragma that can be used for interlanguage function calls. As a part of this, I would have to create a “stub routine” which would be the glue between the C program and the z/OS service in question. Documentation about the pragma on this page:
I’d appreciate any feedback or suggestions about this approach before I invest a lot of time into it. Or maybe there’s an easier way that I am not thinking of.