com.ibm.ftt.jes.util.core
Interface IJESJobUtil

All Known Implementing Classes:
JesJobUtil

public interface IJESJobUtil

Job submission interface. Implementations of this interface can be used to submit jobs and query their status.

Note: Currently, the only jobs supported by the methods with take a jobId as input, are those which can be resolved by one of the JES job filters defined under the JES subsystem in the Remote Systems view.


Field Summary
static String COPY_RIGHT
           
 
Method Summary
 InputStream getJobContents(String jobId)
          Return the contents of the spool datasets for the specified job.
 InputStream getJobContents(String jobId, String ddName)
          Return the contents of the job output spool dataset associated with a specified DDName, e.g JESMSGLG, JESJCL or JESYSMSG.
 List getJobDDNames(String jobId)
          Return a list containing the DDNames of the output spool datasets for a specific JES job.
 String getJobReturnCode(String jobId)
          Get the return code for the job identified by jobId.
 boolean hasJobFinishedExecuting(String jobId)
          Determines whether the job with the specified Job ID has finished execution.
 boolean isConnected()
          Determines whether the system associated with this IJESJobUtil instance is connected.
 String submit(Object resource)
          Submits the specified resource to the system associated with this IJESJobUtil instance.
 

Field Detail

COPY_RIGHT

static final String COPY_RIGHT
See Also:
Constant Field Values
Method Detail

submit

String submit(Object resource)
              throws Exception
Submits the specified resource to the system associated with this IJESJobUtil instance. The contents of the resource should be JCL.

Parameters:
resource - the resource object to be submitted; the resource can be a data set member or a workstation file
Returns:
the Job Id as a result of the submit operation, or null if the Job Id returned by the server is not valid
Throws:
Exception - if job submit fails

isConnected

boolean isConnected()
Determines whether the system associated with this IJESJobUtil instance is connected.

Returns:
true if connected, false otherwise

hasJobFinishedExecuting

boolean hasJobFinishedExecuting(String jobId)
Determines whether the job with the specified Job ID has finished execution.

Parameters:
jobId - the Job Id to check
Returns:
true if the job has finished, false if still running

getJobContents

InputStream getJobContents(String jobId)
                           throws OperationFailedException
Return the contents of the spool datasets for the specified job. The job is identified by the job id which is returned by submit()

Parameters:
jobId - the Job Id whose contents are to be returned
Returns:
the contents of the JES job output datasets or null if job output is not available
Throws:
OperationFailedException - if the job associated with jobId cannot be found or if the job has not finished executing.

getJobContents

InputStream getJobContents(String jobId,
                           String ddName)
                           throws OperationFailedException
Return the contents of the job output spool dataset associated with a specified DDName, e.g JESMSGLG, JESJCL or JESYSMSG. The job is identified by the job id which is returned by submit()

Parameters:
jobId - the Job Id which identifies the JES job whose contents are to be returned
ddName - the DDName associated with the job output dataset.
Returns:
the contents of the JES job output dataset or null if job output is not available
Throws:
OperationFailedException - if the job associated with jobId cannot be found or if the job has not finished executing.

getJobDDNames

List getJobDDNames(String jobId)
                   throws OperationFailedException
Return a list containing the DDNames of the output spool datasets for a specific JES job. The job is identified by the job id which is returned by submit()

Parameters:
jobId - the Job Id which identifies the JES job whose output spool dataset DDNames are to be returned
Returns:
a list containing the DDNames of the output spool datasets for the specified job
Throws:
OperationFailedException - if the job associated with jobId cannot be found or if the job has not finished executing.

getJobReturnCode

String getJobReturnCode(String jobId)
                        throws OperationFailedException
Get the return code for the job identified by jobId. The most common conventional values are: U0000 = all OK U0004 = minor errors or problems U0008 = significant errors or problems U0012 = major errors or problems, the results (e.g. files or reports produced) should not be trusted. U0016 = very serious problems, do not use the results!

Parameters:
jobId - the Job Id whose return code is to be returned
Returns:
the return code assigned to the job by the remote system or null if no return code has been assigned
Throws:
OperationFailedException - if the job associated with jobId cannot be found or if the job has not finished executing.