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()
Metadata
Release files for automvs 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| automvs-0.2.1.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| automvs-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.0 kB
Release files / automvs-0.2.1.tar.gz
| Download URL | automvs-0.2.1.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65b61b5afb94d07a8858baab52e55482c58eecdf4b5a5907ed15a2557958288a
|
|
BLAKE2b-256 checksum How to use checksums |
b29a5fe047979c5aba21169d9c7977934e52c61488f87b24e6c13e8ece119424
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / automvs-0.2.1-py3-none-any.whl
| Download URL | automvs-0.2.1-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
949a5e5ef122a1aba3775c04fc92c2bc9677d9fa6b6ec828eae609aa77be0d4b
|
|
BLAKE2b-256 checksum How to use checksums |
d4c427ac77093123c18826a2dd16c8e0dd8d2ecfed9a56d357fe28f3dee7358b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|