WebSphere Extended Deployment Compute Grid, Version 6.1.1
             Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, z/OS


Batch return codes

The batch job return code is retrieved by using the getBatchJobRC EJB interface, the get BatchJobRC Web services interface, or the lrcmd getBatchJobRC cmd option.

The following table lists the system batch job return codes that are used by Compute Grid. The batch job return code should not be confused with either the JobStatusConstants (see the com.ibm.websphere.longrun.JobStatusConstants API ) or the JobSchedulerConstants (see the com.ibm.websphere.longrun.JobSchedulerConstants API ). The JobStatusConstants represent the status of the job such as submitted, ended, restartable, cancelled or execution failed.

The job status can be obtained by using the getJobStatus EJB interface, the getJobStatus Web services interface, or through the job management console (JMC). The JobSchedulerConstants represent operating conditions returned by the job scheduler on requests involving multiple jobs. For example, int[] cancelJob( String[] jobid )). These conditions include:
  1. Job does not exist
  2. Job is in an invalid state
  3. Database exception has occurred.
Table 1. Return codes and explanations
Return code Explanation
0

Job ended normally

-1

Internal protocol error - WSGrid utility

-2

Input parameter error - WSGrid utility

-4

Job was suspended

-8

Job was cancelled

-10

Job was forcibly cancelled (z/OS only)

-12

Job failed and is in restartable state

-14

Job failed and is in execution failed state**

-16

Catastrophic failure - WSGrid utility

Note: ** This return code value does not apply in the case where the application returns BatchConstants.STEP_COMPLETE_EXECUTION_FAILED from the processJobStep method. In this case, the return code is determined by the application.

There are two options that are used to report an error in a batch application. The first option is for the application to throw an exception when an error is encountered. This results in termination of the job with a batch job return code of -12 and a batch job status of restartable. The second option is for the application to return a BatchConstants.STEP_COMPLETE_EXECUTION_FAILED return code (see the com.ibm.websphere.batch.BatchConstants API) from the processJobStep method and return an application-specific error return code from the destroyJobStep method. This will result in termination of the job and a batch job status of execution failed. The step return code set in the destroyJobStep method is passed to any results algorithm specified on the job step and is used to influence the return code of the job to indicate the specific cause of the failure.




Related information
Batch job steps
Batch data streams
Checkpoint algorithms
Results algorithm
Rolling out an edition
POJO programming model
Concept topic    

Terms of Use | Feedback

Last updated: Oct 30, 2009 1:38:02 PM EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1m1/index.jsp?topic=/com.ibm.websphere.gridmgr.doc/info/scheduler/ccgreturncodes.html