Open-source Languages & Tools for z/OS

 View Only
  • 1.  "Can Python do things like REXX?"

    Posted 10-15-2019 09:26

    I was asked communicating with another Rocket Python user.

    “Its code is much nicer than REXX. I’d to replace more things which are currently done in REXX with Python. I’m interested in executing commands from different address spaces (i. e. TSO and etc.) using Python; executing IDCAMS commands and etc.”

    This is an interesting topic.
    Unfortunately, I have not done much in this area.
    But was looking out for ways to do this too!

    One thing that could be done in Python is to spawn a subprocess to execute other programs / unix commands.
    There is the problem of passing the right parameters and returning the result.

    At IBM there is Mike Fulton that worked on mvscmd, a c programs that could be called from unix shell to execute z/OS services. Recently, he removed his project from github

    However, it seems that mvscmd has been incorporated into z open automation utilties listing an Python API as well
    https://www.ibm.com/support/knowledgecenter/en/SSKFYE_1.0.0/welcome_zoautil.html

    May be that’s worth checking out!

    Any other ideas or experiences?

    Cheers, M_Mueller



  • 2.  RE: "Can Python do things like REXX?"

    Posted 10-15-2019 18:04

    Hey @M_Mueller, Z Open Automation utilities are probably what you’re after, but I’m a little biased since I’m the developer for the python library it offers :wink:

    Depending on what you’re trying to do, calling USS commands from Python could be a way to perform z/OS actions in Python. Alternatively, you can create Python functions with CPython, allowing you to use all of the functionality z/OS offers for C/C++



  • 3.  RE: "Can Python do things like REXX?"

    Posted 01-28-2020 11:39

    Hello @kalebporter,

    your information sound very interesting. I’m also interested in using Python do to z/OS things. As I see from the official site, Python can do lots of things using MVS commands:
    “With ZOA Utilities, you can run traditional MVS commands, such as IEBCOPY , IDCAMS , and IKJEFT01, as well as perform a number of data set operations in the scripting language of your choice.”

    Is that information correct? I’m going to ask our GIS to install the utilities.

    One more question: Rocket Python has problems with working with DDNs. It can’t open it like this open(’//DD:DDIN’,‘r’) which works fine in 2.7.
    What about the Utilities? They require Python 3.6 https://www.ibm.com/support/knowledgecenter/en/SSKFYE_1.0.0/install.html: To use ZOA Utilities with Python, you must install Python 3.6 from Rocket Software.