Class JobCancel


  • public class JobCancel
    extends Object
    CancelJobs class to handle Job cancel on z/OS
    Version:
    4.0
    Author:
    Nikunj Goyal, Frank Giordano
    • Constructor Detail

      • JobCancel

        public JobCancel​(ZosConnection connection)
        CancelJobs constructor
        Parameters:
        connection - connection information, see ZosConnection object
      • JobCancel

        public JobCancel​(ZosConnection connection,
                         ZosmfRequest request)
        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 object
        request - any compatible ZoweRequest Interface object
    • Method Detail

      • cancel

        public Response cancel​(String jobName,
                               String jobId,
                               String version)
                        throws ZosmfRequestException
        Cancel a job on z/OS.
        Parameters:
        jobName - name of job to cancel
        jobId - job id
        version - 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:
        ZosmfRequestException - request error state
      • cancelByJob

        public Response cancelByJob​(Job job,
                                    String version)
                             throws ZosmfRequestException
        Cancel a job on z/OS.
        Parameters:
        job - job document wanting to cancel
        version - 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:
        ZosmfRequestException - request error state