Interface IZosBatchJob


  • public interface IZosBatchJob

    Represents a zOS Batch Job.

    Author:
    Michael Baylis
    • Method Detail

      • getJobId

        String getJobId()
        The jobid for this Job. Returns "????????" if no jobid has been associated
        Returns:
        batch jobid
      • getOwner

        String getOwner()
        The owner for this Job. Returns "????????" if no owner has been associated
        Returns:
        batch job owner
      • getType

        String getType()
        The type for this Job, i.e. JOB, STC or TSU. Returns "???" if no type has been associated
        Returns:
        batch job type
      • getStatusString

        String getStatusString()
        The batch job value as a String, e.g.
        INPUT, ACTIVE, OUTPUT etc.
        Returns "????????" if the job has not been submitted

        N.B. Values are implementation dependent

        Returns:
        batch job value
      • getRetcode

        String getRetcode()
        The batch job completion return code, e.g.
        CC 0000, CC 0020, JCL ERROR, ABEND S0C4/code> etc.
        Returns "????" if the job has not been submitted
        Returns:
      • waitForJob

        int waitForJob()
                throws ZosBatchException
        Wait for a job to complete. Return the highest return code for the job. The method will wait for the default resource wait time before timing out. Returns Integer.MIN_VALUE if return code is non numeric. Use getRetcode() to get the String value
        Returns:
        highest CC
        Throws:
        ZosBatchException
      • waitForJob

        int waitForJob​(long timeout)
                throws ZosBatchException
        Wait for a job to complete. Return the highest return code for the job. The method will wait for the default resource wait time before timing out. Returns Integer.MIN_VALUE if return code is non numeric. Use getRetcode() to get the String value
        Parameters:
        timeout - in seconds
        Returns:
        highest CC
        Throws:
        ZosBatchException
      • getSpoolFile

        IZosBatchJobOutputSpoolFile getSpoolFile​(String ddname)
                                          throws ZosBatchException
        Convenience method to retrieve the content of a spool file from the batch job given the ddname.

        NOTE: Returns the first matching instance in the list. If the batch job has multiple steps, there may be multiple instances of the ddname.

        Parameters:
        ddname - of the spool file
        Returns:
        the content of the first found spool file with the specified ddname
        Throws:
        ZosBatchException
      • saveOutputToResultsArchive

        void saveOutputToResultsArchive​(String rasPath)
                                 throws ZosBatchException
        Save the job output to the Results Archive Store
        Parameters:
        rasPath - path in Results Archive Store
        Throws:
        ZosBatchException
      • setShouldArchive

        void setShouldArchive​(boolean shouldArchive)
        Set flag to control if the job output should be automatically stored to the test output. Defaults to true
      • shouldArchive

        boolean shouldArchive()
        Return flag that controls if the job output should be automatically stored to the test output
      • setShouldCleanup

        void setShouldCleanup​(boolean shouldCleanup)
        Set flag to control if the job output should be automatically purged from zOS. Defaults to true
      • shouldCleanup

        boolean shouldCleanup()
        Return flag that controls if the job output should be automatically purged from zOS