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 command option.

The following table lists the system batch job return codes that the batch environment uses. Do not confuse the batch job return code with either the job status constants (see the com.ibm.websphere.longrun.JobStatusConstants API) or the job scheduler constants (see the com.ibm.websphere.longrun.JobSchedulerConstants API). The JobStatusConstants represent the status of the job such as submitted, ended, restartable, canceled, 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. 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. Batch job return codes. The table includes each return code with an explanation.
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 canceled

-10

Job was forcibly canceled (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: Even though an application can set a value for the job return code, that value is only returned when the job completes normally. If the job fails with a status of either execution fails or restartable the value returned is one of the runtime-set negative return codes described in the preceding table.
There are two options that are used to report an error in a batch application:



Related information
Batch job steps
Batch data streams
Checkpoint algorithms
Results algorithms
Components of a batch application
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Feb 6, 2014 8:11:25 PM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-mp&topic=cgrid_cgreturncodes
File name: cgrid_cgreturncodes.html