Jobs¶
- class zos_jobs.zowe.zos_jobs_for_zowe_sdk.Jobs(connection)¶
Class used to represent the base z/OSMF Jobs API.
- connection¶
Connection object
- get_job_status(jobname, jobid)¶
Retrieve the status of a given job on JES.
- Parameters
jobname (str) – The name of the job
jobid (str) – The job id on JES
- Returns
A JSON object containing the status of the job on JES
- Return type
response_json
- list_jobs(owner=None, prefix='*', max_jobs=1000, user_correlator=None)¶
Retrieve list of jobs on JES based on the provided arguments.
- Parameters
owner (str, optional) – The job owner (default is None)
prefix (str, optional) – The job name prefix (default is *)
max_jobs (int, optional) – The maximum number of jobs in the output (default is 1000)
user_correlator (str, optional) – The z/OSMF user correlator attribute (default is None)
- Returns
A JSON containing a list of jobs on JES queue based on the given parameters
- Return type
json
- submit_from_local_file(jcl_path)¶
Submit a job from local file.
This function will internally call the submit_plaintext function in order to submit the contents of the given input file
- Parameters
jcl_path (str) – Path to the local file where the JCL is located
- Raises
FileNotFoundError – If the local file provided is not found
- Returns
A JSON containing the result of the request execution
- Return type
json
- submit_from_mainframe(jcl_path)¶
Submit a job from a given dataset.
- Parameters
jcl_path (str) – The dataset where the JCL is located
- Returns
A JSON containing the result of the request execution
- Return type
json
- submit_plaintext(jcl)¶
Submit a job from plain text input.
- Parameters
jcl (str) – The plain text JCL to be submitted
- Returns
A JSON containing the result of the request execution
- Return type
json