Package zowe.client.sdk.zosjobs
Class CancelJobs
- java.lang.Object
-
- zowe.client.sdk.zosjobs.CancelJobs
-
public class CancelJobs extends Object
CancelJobs class to handle Job cancel- Version:
- 1.0
- Author:
- Nikunj Goyal
-
-
Constructor Summary
Constructors Constructor Description CancelJobs(ZOSConnection connection)CancelJobs constructorCancelJobs(ZOSConnection connection, ZoweRequest request)Alternative CancelJobs constructor with ZoweRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponsecancelJob(String jobName, String jobId, String version)Cancel a job that resides in a z/OS data set.ResponsecancelJobForJob(Job job, String version)Cancel a job that resides in a z/OS data set.ResponsecancelJobsCommon(ModifyJobParams params)Cancel a job that resides in a z/OS data set.
-
-
-
Constructor Detail
-
CancelJobs
public CancelJobs(ZOSConnection connection)
CancelJobs constructor- Parameters:
connection- connection information, see ZOSConnection object
-
CancelJobs
public CancelJobs(ZOSConnection connection, ZoweRequest request) throws Exception
Alternative CancelJobs constructor with ZoweRequest object. This is mainly used for internal code unit testing with mockito, and it is not recommended to be used by the larger community.- Parameters:
connection- connection information, see ZOSConnection objectrequest- any compatible ZoweRequest Interface type object- Throws:
Exception- processing error
-
-
Method Detail
-
cancelJob
public Response cancelJob(String jobName, String jobId, String version) throws Exception
Cancel a job that resides in a z/OS data set.- Parameters:
jobName- name of job to canceljobId- job idversion- version number - 1.0 or 2.0 To request asynchronous processing for this service (the default), set the "version" property to 1.0 or omit the property from the request. To request synchronous processing, set "version" to 2.0. If so, the system will attempt to process the request synchronously, if such processing is supported on the target JES2 subsystem.- Returns:
- job document with details about the submitted job
- Throws:
Exception- error canceling
-
cancelJobForJob
public Response cancelJobForJob(Job job, String version) throws Exception
Cancel a job that resides in a z/OS data set.- Parameters:
job- job document wanting to cancelversion- version number - 1.0 or 2.0 To request asynchronous processing for this service (the default), set the "version" property to 1.0 or omit the property from the request. To request synchronous processing, set "version" to 2.0. If so, the system will attempt to process the request synchronously, if such processing is supported on the target JES2 subsystem.- Returns:
- job document with details about the submitted job
- Throws:
Exception- error canceling
-
cancelJobsCommon
public Response cancelJobsCommon(ModifyJobParams params) throws Exception
Cancel a job that resides in a z/OS data set.- Parameters:
params- cancel job parameters, see cancelJobsCommon object- Returns:
- job document with details about the submitted job
- Throws:
Exception- error canceling
-
-