Skip to content

Instantly share code, notes, and snippets.

@plavjanik
Created March 22, 2022 15:23
Show Gist options
  • Select an option

  • Save plavjanik/38cc8114009754bb595b635470b8eb6c to your computer and use it in GitHub Desktop.

Select an option

Save plavjanik/38cc8114009754bb595b635470b8eb6c to your computer and use it in GitHub Desktop.
prefix = "'ZWE*'"
owner = "ZOWUSER"
for job in zowe(f"zos-jobs list jobs --prefix {prefix} --owner {owner}"):
if job['retcode'] not in ['CC 0000', None]:
print(f"{job['jobname']} {job['jobid']} {job['retcode']}")
for spool_file in zowe(f"zos-jobs list spool-files-by-jobid {job['jobid']}"):
if spool_file['ddname'] == 'SYSOUT':
sysout = zowe(f"zos-jobs view spool-file-by-id {job['jobid']} {spool_file['id']}")
print(sysout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment