Python library for MVS/CE automation
Project description
MVS Automation Python Library
This library allows the use of MVS/CE in an automated fashion. This can be used for deploying XMI files, pushing out updates, building software, creating custom MVS deployments.
Using this library requires a recent version of hercules SDL and one of MVS/CE, TK5, or TK4-.
TK5/TK4-: If you're using either TK5 or TK4-, they must be IPL'd before hand. Adding auto IPL of those two flavors will come at a later date.
Example:
Submit JCL and check the results, attach a device and send an operator command::
import sys
from automvs import automation
if len(sys.argv) != 2:
print("Usage: python go_mvs.py <MVS system> <MVS PATH> username password")
print(" MVS system: one of MVSCE, TK4- or TK5\n MVS PATH: /path/to/the/system. E.g. /home/test/mvs/tk4-")
sys.exit(1)
mvs_type = sys.argv[1]
folder = sys.argv[2]
username = sys.argv[3]
password = sys.argv[4]
punch_port = 3505
web_port = 8038
ip = '127.0.0.1'
build = automation(
system=mvs_type,
system_path=folder,
ip = ip,
punch_port = punch_port,
web_port = web_port,
username=username,
password=password
)
cwd = os.getcwd()
if mvs_type == 'MVSCE'
build.ipl(clpa=False)
try:
print("Submitting {}/jcl/upload.jcl".format(cwd))
with open("{}/jcl/upload.jcl".format(cwd),"r") as jcl:
build.submit(jcl.read())
build.wait_for_string("HASP250 UPLOAD IS PURGED")
build.check_maxcc("UPLOAD")
build.send_herc('devinit 170 tape/zdlib1.het')
build.wait_for_string("IEF238D SMP4P44 - REPLY DEVICE NAME OR 'CANCEL'.")
build.send_reply('170')
build.send_oper("$DU")
finally:
if mvs_type == 'MVSCE'
build.quit_hercules()
Remote Automation
This library also supports remote automation through the use of a rexx script available at https://github.com/MVS-sysgen/automvs/tree/main/REXX. Example usage of that script:
import sys
from automvs import automation
if len(sys.argv) != 2:
print("Usage: python go_mvs.py <MVS system> username password")
print(" MVS system: one of MVSCE, TK4- or TK5\n MVS PATH: /path/to/the/system. E.g. /home/test/mvs/tk4-")
sys.exit(1)
mvs_type = sys.argv[1]
username = sys.argv[3]
password = sys.argv[4]
punch_port = 3505
ip = '127.0.0.1'
remote_port = 9856
build = automation(
system=mvs_type,
ip = ip,
punch_port = punch_port,
username=username,
password=password,
remote_port = remote_port
)
cwd = os.getcwd()
try:
print("Submitting {}/jcl/upload.jcl".format(cwd))
with open("{}/jcl/upload.jcl".format(cwd),"r") as jcl:
build.submit(jcl.read())
build.wait_for_job("UPLOAD")
build.check_maxcc("UPLOAD")
build.send_herc('devinit 170 tape/zdlib1.het')
build.wait_for_string("IEF238D SMP4P44 - REPLY DEVICE NAME OR 'CANCEL'.")
build.send_reply('170')
build.send_oper("$DU")
finally:
if mvs_type == 'MVSCE'
build.quit_hercules()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file automvs-0.2.0.tar.gz
.
File metadata
- Download URL: automvs-0.2.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6515cf3609fbb060ee470e80f5a59609fa4213afce076a24b98eaeeddfd86682 |
|
MD5 | 961307abf62b25191fd9be465e671bf1 |
|
BLAKE2b-256 | 9427fab3b50c1367fd62ff3e65b0dcb0934254eb3bc4e5933030fbccfa5f9fd9 |
File details
Details for the file automvs-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: automvs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5000269e87fc52a8cec9bfb746944d3f0f271af41ea756b27dc0213f98d029da |
|
MD5 | d4dee6e3f7993f571c433286c9eafda8 |
|
BLAKE2b-256 | f0095785b28a9e4b66a0e950f070d8d808f6c563d1fb6b5391c5e9e07322e0dc |