-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into validate_schema
Signed-off-by: Aaditya Sinha <[email protected]>
- Loading branch information
Showing
49 changed files
with
1,403 additions
and
968 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"python.formatting.provider": "black", | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true | ||
} | ||
} | ||
} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[tool.black] | ||
line-length = 120 | ||
|
||
[tool.isort] | ||
profile = "black" |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,46 @@ | ||
from zowe.zos_jobs_for_zowe_sdk import Jobs | ||
import time | ||
import os | ||
import time | ||
|
||
from zowe.zos_jobs_for_zowe_sdk import Jobs | ||
|
||
# ----------------------------------------------------- | ||
# Test drive the jobs SDK with jcl from a file | ||
# ----------------------------------------------------- | ||
# ----------------------------------------------------- | ||
# Change <xxxx> below to the name of your zosmf profile | ||
|
||
connection = { | ||
"plugin_profile": "xxxx" | ||
} | ||
connection = {"plugin_profile": "xxxx"} | ||
|
||
|
||
print("...Submit a sleeper job\n") | ||
my_jobs = Jobs(connection) | ||
job = my_jobs.submit_from_local_file("jcl\sleep.jcl") | ||
job_name = job['jobname'] | ||
job_id = job['jobid'] | ||
job_name = job["jobname"] | ||
job_id = job["jobid"] | ||
print(f"Job {job_name} ID {job_id} submitted") | ||
|
||
# ----------------------------------------------------- | ||
# Wait until the job completes | ||
# ----------------------------------------------------- | ||
# ----------------------------------------------------- | ||
|
||
boolJobNotDone = True | ||
while boolJobNotDone: | ||
status = my_jobs.get_job_status(job_name,job_id) | ||
job_status = status['status'] | ||
if job_status != 'OUTPUT': | ||
status = my_jobs.get_job_status(job_name, job_id) | ||
job_status = status["status"] | ||
if job_status != "OUTPUT": | ||
print(f"Status {job_status}") | ||
time.sleep(5) | ||
else: | ||
boolJobNotDone = False | ||
|
||
# ----------------------------------------------------- | ||
# Get the return code | ||
# ----------------------------------------------------- | ||
job_retcode = status['retcode'] | ||
job_correlator = status['job-correlator'] | ||
# Get the return code | ||
# ----------------------------------------------------- | ||
job_retcode = status["retcode"] | ||
job_correlator = status["job-correlator"] | ||
print(f"Job {job_name} ID {job_id} ended with {job_retcode}") | ||
|
||
# ----------------------------------------------------- | ||
# Get all the spool files and dump them in <output_dir> | ||
# ----------------------------------------------------- | ||
output_dir = './output' | ||
my_jobs.get_job_output_as_files(status,output_dir) | ||
# ----------------------------------------------------- | ||
output_dir = "./output" | ||
my_jobs.get_job_output_as_files(status, output_dir) |
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
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
Oops, something went wrong.