com.microfocus.zos.model

## Interface IJobFacility2

-     public interface IJobFacility2

  Interface for a job facility containing the most important methods for accessing jobs from the z/OS JES.

  Replacement of `IJobFacility` with improved method signatures and return types.

  Author:
    Micro Focus

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `FILTER_JOB_OWNER` Job owner filter.
    `static java.lang.String` | `FILTER_JOB_PHASE_CODE` Job phase code filter.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `cancelJob(ISystemImage pImg, java.lang.String pJobId, org.eclipse.core.runtime.IProgressMonitor pMon)` Cancels a running job.
    `java.lang.String` | `getJobContents(ISystemImage pImg, java.lang.String pJobId, org.eclipse.core.runtime.IProgressMonitor pMon)` Returns the output of a job.
    `java.lang.String` | `getJobContents(ISystemImage pImg, java.lang.String pJobId, java.lang.String pDDName, java.lang.String pJobPartDsn, org.eclipse.core.runtime.IProgressMonitor pMon)` Returns the output of a job part.
    `java.util.List<IJobPart>` | `getJobDDs(ISystemImage pImg, IJob pJob, org.eclipse.core.runtime.IProgressMonitor pMon)` Obtains a list of `IJobPart`s for the given job ID.
    `java.util.List<IJob>` | `getJobs(ISystemImage pImg, java.lang.String pJobNameFilter, java.util.Map<java.lang.String,java.lang.String> pAdditionalFilters, org.eclipse.core.runtime.IProgressMonitor pMon)` Returns all jobs that match the given filter criteria.
    `java.util.List<IJob>` | `getJobsByJobID(ISystemImage pImg, java.lang.String pJobIDFilter, java.util.Map<java.lang.String,java.lang.String> pAdditionalFilters, org.eclipse.core.runtime.IProgressMonitor pMon)` Returns all jobs that match the given filter criteria.
    `java.lang.String` | `purgeJob(ISystemImage pImg, java.lang.String pJobId, org.eclipse.core.runtime.IProgressMonitor pMon)` Purges a job on the mainframe.
    `java.util.List<java.lang.String>` | `submitJob(ISystemImage pImg, java.lang.String pJcl, org.eclipse.core.runtime.IProgressMonitor pMon)` Submits a Job from the given input stream.
    `java.util.List<java.lang.String>` | `submitJob(ISystemImage pImg, java.lang.String pMember, java.lang.String pDataset, org.eclipse.core.runtime.IProgressMonitor pMon)` Submits a job from a data set or member.

- - ### Field Detail

    - #### FILTER_JOB_OWNER

          static final java.lang.String FILTER_JOB_OWNER

      Job owner filter.
      See Also:
        Constant Field Values

    - #### FILTER_JOB_PHASE_CODE

          static final java.lang.String FILTER_JOB_PHASE_CODE

      Job phase code filter.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### submitJob

          java.util.List<java.lang.String> submitJob(ISystemImage pImg,
                                                     java.lang.String pMember,
                                                     java.lang.String pDataset,
                                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                                              throws java.io.IOException

      Submits a job from a data set or member.
      Parameters:
        `pImg` - an `ISystemImage`
        `pMember` - can be `null` (for sequential data sets)
        `pDataset` - a data set name
        `pMon` - progress monitor
      Returns:
        a list of submitted job IDs
      Throws:
        `java.io.IOException` - if the job submit or parsing the server response failed

    - #### getJobs

          java.util.List<IJob> getJobs(ISystemImage pImg,
                                       java.lang.String pJobNameFilter,
                                       java.util.Map<java.lang.String,java.lang.String> pAdditionalFilters,
                                       org.eclipse.core.runtime.IProgressMonitor pMon)
                                throws java.io.IOException

      Returns all jobs that match the given filter criteria.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJobNameFilter` - 1-8 characters, `*` and `?` allowed
        `pAdditionalFilters` - a map of additional filters. Keys should be filter constants of this interface. A server implementation may not support all filter constants or even different ones. Can be `null`.
        `pMon` - progress monitor
      Returns:
        a list of `IJob`s (can be empty)
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobsByJobID

          java.util.List<IJob> getJobsByJobID(ISystemImage pImg,
                                              java.lang.String pJobIDFilter,
                                              java.util.Map<java.lang.String,java.lang.String> pAdditionalFilters,
                                              org.eclipse.core.runtime.IProgressMonitor pMon)
                                       throws java.io.IOException

      Returns all jobs that match the given filter criteria.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJobIDFilter` - 1-8 characters, `*` and `?` allowed
        `pAdditionalFilters` - a map of additional filters. Keys should be filter constants of this interface. A server implementation may not support all filter constants or even different ones. Can be `null`.
        `pMon` - progress monitor
      Returns:
        a list of `IJob`s (can be empty)
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobContents

          java.lang.String getJobContents(ISystemImage pImg,
                                          java.lang.String pJobId,
                                          java.lang.String pDDName,
                                          java.lang.String pJobPartDsn,
                                          org.eclipse.core.runtime.IProgressMonitor pMon)
                                   throws java.io.IOException

      Returns the output of a job part.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJobId` - the ID of an existing job
        `pDDName` - the DDName (job part name) of the desired job part
        `pJobPartDsn` - the DSN of the desired job part. Optional, if a unique DDName is given
        `pMon` - progress monitor
      Returns:
        the contents of the specified job part
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command or parsing the response
      See Also:
        `getJobContents(ISystemImage, String, IProgressMonitor)`

    - #### getJobContents

          java.lang.String getJobContents(ISystemImage pImg,
                                          java.lang.String pJobId,
                                          org.eclipse.core.runtime.IProgressMonitor pMon)
                                   throws java.io.IOException

      Returns the output of a job.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJobId` - the ID of an existing job
        `pMon` - progress monitor
      Returns:
        the contents of the job with the given job ID
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command or parsing the response

    - #### cancelJob

          java.lang.String cancelJob(ISystemImage pImg,
                                     java.lang.String pJobId,
                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                              throws java.io.IOException

      Cancels a running job.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJobId` - the ID of a running job
        `pMon` - progress monitor
      Returns:
        a user-readable message or `null` if the server doesn't return any message
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command or parsing the response

    - #### purgeJob

          java.lang.String purgeJob(ISystemImage pImg,
                                    java.lang.String pJobId,
                                    org.eclipse.core.runtime.IProgressMonitor pMon)
                             throws java.io.IOException

      Purges a job on the mainframe.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJobId` - the ID of the job to purge
        `pMon` - progress monitor
      Returns:
        a user-readable message or `null` if the server does not return any message
      Throws:
        `java.io.IOException` - if any unexpected exception occurs

    - #### getJobDDs

          java.util.List<IJobPart> getJobDDs(ISystemImage pImg,
                                             IJob pJob,
                                             org.eclipse.core.runtime.IProgressMonitor pMon)
                                      throws java.io.IOException

      Obtains a list of `IJobPart`s for the given job ID.
      Parameters:
        `pImg` - an `ISystemImage`
        `pJob` - the existing job
        `pMon` - progress monitor
      Returns:
        a list of `IJobPart`s (can be empty)
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command or parsing the response

    - #### submitJob

          java.util.List<java.lang.String> submitJob(ISystemImage pImg,
                                                     java.lang.String pJcl,
                                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                                              throws java.io.IOException

      Submits a Job from the given input stream.
      Parameters:
        `pImg` - The `ISystemImage`
        `pJcl` - the JCL contents to submit
        `pMon` - progress monitor
      Returns:
        a list of submitted job IDs
      Throws:
        `java.io.IOException` - if an Exception occurs during sending the command

Copyright © 2015 Micro Focus GmbH. All rights reserved.