Class JobSubmit


  • public class JobSubmit
    extends Object
    Class to handle submitting of z/OS batch jobs via z/OSMF
    Version:
    2.0
    Author:
    Frank Giordano
    • Constructor Detail

      • JobSubmit

        public JobSubmit​(ZosConnection connection)
        SubmitJobs Constructor
        Parameters:
        connection - connection information, see ZOSConnection object
      • JobSubmit

        public JobSubmit​(ZosConnection connection,
                         ZoweRequest request)
        Alternative SubmitJobs 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

      • submitByJcl

        public Job submitByJcl​(String jcl,
                               String internalReaderRecfm,
                               String internalReaderLrecl)
                        throws Exception
        Submit a string of JCL to run
        Parameters:
        jcl - JCL content that you want to be submitted
        internalReaderRecfm - record format of the jcl you want to submit. "F" (fixed) or "V" (variable)
        internalReaderLrecl - logical record length of the jcl you want to submit
        Returns:
        job document with details about the submitted job
        Throws:
        Exception - error on submitting
      • submitJclCommon

        public Job submitJclCommon​(SubmitJclParams params)
                            throws Exception
        Submit a JCL string to run which can contain JCL symbolic substitutions
        Parameters:
        params - submit jcl parameters, see SubmitJclParams object
        Returns:
        job document with details about the submitted job
        Throws:
        Exception - error on submitting
      • submit

        public Job submit​(String jobDataSet)
                   throws Exception
        Submit a job that resides in a z/OS dataset.
        Parameters:
        jobDataSet - job dataset to be translated into SubmitJobParams object
        Returns:
        job document with details about the submitted job
        Throws:
        Exception - error on submitting
      • submitCommon

        public Job submitCommon​(SubmitJobParams params)
                         throws Exception
        Submit a job that resides in a z/OS dataset.
        Parameters:
        params - submit job parameters, see SubmitJobParams object
        Returns:
        job document with details about the submitted job
        Throws:
        Exception - error on submitting