Last active
September 15, 2023 14:06
-
-
Save dkelosky/b45af05b7fa244ccc2f228ad92d7e8f1 to your computer and use it in GitHub Desktop.
Call python and pass variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* REXX */ | |
/* obtain system info from OPS */ | |
sysname = OPSINFO("SYSNAME") | |
opsversion = OPSINFO("VERSION") | |
oslevel = OPSINFO("MVSVERSION") | |
osfnum = "" | |
rc = opsprm("show", "osfmin") | |
do while queued() > 0 | |
pull data | |
osfnum = data | |
end | |
/* run python script */ | |
cmd = "python3 /tmp/script.py" | |
/* echo output */ | |
address uss | |
"USSCMD COMMAND('"cmd sysname opsversion oslevel osfnum"') STEM(RESPONSE)" | |
if RESPONSE.0 > 0 then do | |
do i = 1 to RESPONSE.0 | |
say " " RESPONSE.i | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment