from zowe.zos_jobs_for_zowe_sdk import Jobs
from zowe.core_for_zowe_sdk import ProfileManager
profile = ProfileManager().load(profile_type="zosmf")
jobs = Jobs(profile)
jobs_list = jobs.list_jobs()
for job in jobs_list:
print(f"jobid: {job.jobid} is: {job.status}")
You get a warning like ProfileParsingWarning: "Given profile type 'base' has no default profile name" warnings.warn(
However, this same profile does not produce a warning for Zowe CLI. As a workaround you can add:
If you create a
zowe.config.json
like this (with valid values for host/user/passwor):Then run python code such as:
You get a warning like
ProfileParsingWarning: "Given profile type 'base' has no default profile name" warnings.warn(
However, this same profile does not produce a warning for Zowe CLI. As a workaround you can add:
And: