Package zowe.client.sdk.zosjobs.methods
Class JobGet
- java.lang.Object
-
- zowe.client.sdk.zosjobs.methods.JobGet
-
public class JobGet extends Object
Class to handle getting a job and started task information- Version:
- 4.0
- Author:
- Frank Giordano
-
-
Constructor Summary
Constructors Constructor Description JobGet(ZosConnection connection)GetJobs Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Job>getAll()Get jobs (defaults to the user ID of the session as an owner).JobgetById(String jobId)Get a job by job id.List<Job>getByOwner(String owner)Get jobs that are owned by a certain user or pattern of users.List<Job>getByOwnerAndPrefix(String owner, String prefix)Get a list of jobs that match an owner and prefix.List<Job>getByPrefix(String prefix)Get jobs that match a job name by prefix.List<Job>getCommon(JobGetInputData params)Get jobs filtered by owner and prefix.StringgetJcl(String jobName, String jobId)Get JCL from a job.StringgetJclByJob(Job job)Get JCL from a job.StringgetJclCommon(CommonJobInputData params)Get the JCL that was used to submit a job.StringgetSpoolContent(String jobName, String jobId, int spoolId)Get spool content from a job using the job name, job ID, and spool ID number.StringgetSpoolContent(JobFile jobFile)Get spool content from a job (keeping a naming convention pattern with this duplication function).StringgetSpoolContentCommon(JobFile jobFile)Get spool file content from a job file definition.List<JobFile>getSpoolFiles(String jobName, String jobId)Get a list of all spool files for a job.List<JobFile>getSpoolFilesByJob(Job job)Get a list of all job spool files for a job.List<JobFile>getSpoolFilesCommon(CommonJobInputData params)Get a list of all job spool files for a job.JobgetStatus(String jobName, String jobId)Get the status and other details (e.g., owner, return code) for a job, including step-data.JobgetStatusByJob(Job job)Get the status and other details (e.g., owner, return code) for a job, including step-data.JobgetStatusCommon(CommonJobInputData params)Get the status and other details (e.g., owner, return code) for a job, including step-data.StringgetStatusValue(String jobName, String jobId)Get the status value only for a given job name and id.StringgetStatusValueByJob(Job job)Get the status value for a given job object.StringgetUrl()Get url specified for rest processing.
-
-
-
Constructor Detail
-
JobGet
public JobGet(ZosConnection connection)
GetJobs Constructor.- Parameters:
connection- for connection information, see ZosConnection object
-
-
Method Detail
-
getJcl
public String getJcl(String jobName, String jobId) throws ZosmfRequestException
Get JCL from a job.- Parameters:
jobName- job name for the job for which you want to retrieve JCLjobId- job ID for the job for which you want to retrieve JCL- Returns:
- job document on resolve
- Throws:
ZosmfRequestException- request error state
-
getJclByJob
public String getJclByJob(Job job) throws ZosmfRequestException
Get JCL from a job. Alternate version of the API that accepts a Job object returned by other APIs such as SubmitJobs.- Parameters:
job- job for which you would like to retrieve JCL- Returns:
- JCL content
- Throws:
ZosmfRequestException- request error state
-
getJclCommon
public String getJclCommon(CommonJobInputData params) throws ZosmfRequestException
Get the JCL that was used to submit a job.- Parameters:
params- for common job parameters, see CommonJobParams object- Returns:
- JCL content
- Throws:
ZosmfRequestException- request error state
-
getById
public Job getById(String jobId) throws ZosmfRequestException
Get a job by job id.- Parameters:
jobId- job ID for the job for which you want to get status- Returns:
- one job object, matching the given job ID, without step-data
- Throws:
ZosmfRequestException- request error state
-
getAll
public List<Job> getAll() throws ZosmfRequestException
Get jobs (defaults to the user ID of the session as an owner).- Returns:
- list of job objects (matching jobs), without step-data
- Throws:
ZosmfRequestException- request error state
-
getByOwner
public List<Job> getByOwner(String owner) throws ZosmfRequestException
Get jobs that are owned by a certain user or pattern of users.- Parameters:
owner- owner for which to get jobs. Supports wildcard e.g., IBMU* returns jobs owned by all users whose ID beings with "IBMU"- Returns:
- list of job objects (matching jobs), without step-data
- Throws:
ZosmfRequestException- request error state
-
getByOwnerAndPrefix
public List<Job> getByOwnerAndPrefix(String owner, String prefix) throws ZosmfRequestException
Get a list of jobs that match an owner and prefix.- Parameters:
owner- owner for which to get jobs. Supports wildcard e.g., IBMU* returns jobs owned by all users whose ID beings with "IBMU"prefix- prefix for which to get jobs. Supports wildcard e.g., JOBNM* returns jobs with names starting with "JOBNM"- Returns:
- list of job objects (matching jobs), without step-data
- Throws:
ZosmfRequestException- request error state
-
getByPrefix
public List<Job> getByPrefix(String prefix) throws ZosmfRequestException
Get jobs that match a job name by prefix. Defaults to job(s) owned by the user ID in the session.- Parameters:
prefix- job name prefix for which to list jobs. Supports wildcard e.g., JOBNM*- Returns:
- list of job objects (matching jobs), without step-data
- Throws:
ZosmfRequestException- request error state
-
getCommon
public List<Job> getCommon(JobGetInputData params) throws ZosmfRequestException
Get jobs filtered by owner and prefix.- Parameters:
params- to get job parameters, see GetJobParams object- Returns:
- list of job objects (matching jobs), without step-data
- Throws:
ZosmfRequestException- request error state
-
getSpoolContent
public String getSpoolContent(JobFile jobFile) throws ZosmfRequestException
Get spool content from a job (keeping a naming convention pattern with this duplication function).- Parameters:
jobFile- spool file for which you want to retrieve the content- Returns:
- spool content
- Throws:
ZosmfRequestException- request error state
-
getSpoolContent
public String getSpoolContent(String jobName, String jobId, int spoolId) throws ZosmfRequestException
Get spool content from a job using the job name, job ID, and spool ID number.- Parameters:
jobName- job name for the job containing the spool contentjobId- job id for the job containing the spool contentspoolId- id number assigned by zosmf that identifies the particular job spool file (DD)- Returns:
- spool content
- Throws:
ZosmfRequestException- request error state
-
getSpoolContentCommon
public String getSpoolContentCommon(JobFile jobFile) throws ZosmfRequestException
Get spool file content from a job file definition.- Parameters:
jobFile- spool file for which you want to retrieve the content- Returns:
- spool content
- Throws:
ZosmfRequestException- request error state
-
getSpoolFiles
public List<JobFile> getSpoolFiles(String jobName, String jobId) throws ZosmfRequestException
Get a list of all spool files for a job.- Parameters:
jobName- job name for the job for which you want to get a list of spool filesjobId- job ID for the job for which you want to get a list of spool files- Returns:
- list of JobFile objects
- Throws:
ZosmfRequestException- request error state
-
getSpoolFilesCommon
public List<JobFile> getSpoolFilesCommon(CommonJobInputData params) throws ZosmfRequestException
Get a list of all job spool files for a job.- Parameters:
params- for common job parameters, see CommonJobParams object- Returns:
- list of JobFile objects
- Throws:
ZosmfRequestException- request error state
-
getSpoolFilesByJob
public List<JobFile> getSpoolFilesByJob(Job job) throws ZosmfRequestException
Get a list of all job spool files for a job. Alternate version of the API that accepts a Job object returned by other APIs such as SubmitJobs.- Parameters:
job- job for which you would like to get a list of job spool files- Returns:
- list of JobFile objects
- Throws:
ZosmfRequestException- request error state
-
getStatus
public Job getStatus(String jobName, String jobId) throws ZosmfRequestException
Get the status and other details (e.g., owner, return code) for a job, including step-data.- Parameters:
jobName- job name for the job for which you want to get statusjobId- job ID for the job for which you want to get status- Returns:
- job document (matching job)
- Throws:
ZosmfRequestException- request error state
-
getStatusCommon
public Job getStatusCommon(CommonJobInputData params) throws ZosmfRequestException
Get the status and other details (e.g., owner, return code) for a job, including step-data.- Parameters:
params- for common job parameters, see CommonJobParams object- Returns:
- job document (matching job)
- Throws:
ZosmfRequestException- request error state
-
getStatusByJob
public Job getStatusByJob(Job job) throws ZosmfRequestException
Get the status and other details (e.g., owner, return code) for a job, including step-data. Alternate version of the API that accepts a Job object returned by other APIs such as SubmitJobs. Even though the parameter and return value are of the same type, the Job object returned will have the current status of the job and will contain step-data.- Parameters:
job- job document- Returns:
- job document (matching job)
- Throws:
ZosmfRequestException- request error state
-
getStatusValue
public String getStatusValue(String jobName, String jobId) throws ZosmfRequestException
Get the status value only for a given job name and id.- Parameters:
jobName- job name for the job for which you want to get statusjobId- job ID for the job for which you want to get status- Returns:
- status value
- Throws:
ZosmfRequestException- request error state
-
getStatusValueByJob
public String getStatusValueByJob(Job job) throws ZosmfRequestException
Get the status value for a given job object.- Parameters:
job- job document- Returns:
- status value
- Throws:
ZosmfRequestException- request error state
-
getUrl
public String getUrl()
Get url specified for rest processing.- Returns:
- url
-
-