Check the Batch Job Status
You can check the status of a batch job by calling a stored procedure in
IBM® Controller from an external tool. To run a
status request, you enter both the ID of the batch job and the number of minutes to pause between
checking the status.
Procedure
Call the stored procedure, named usp_checkbatchjobstatus,
using the following parameters.
| Number | Name | Description |
|---|---|---|
| 1 | pBatchId | The batch ID you want to see the status for. Data type: Int |
| 2 | pSnoozeMin | The number of minutes (1-59) to pause between checking
the status. Data type: Int |
Results
| Return code | Description |
|---|---|
| 0 | The batch ID was not found. |
| 3 | The batch job was completed successfully. |
| 4 | The batch job was completed with errors. |
| 5 | The batch job was set to the ON HOLD status. |
| -1000 | The number of minutes to pause must be between 1 and 59. |
When you export data to Controller from an external application, a return code indicates whether the export was successful. The following return codes may appear.
| Code | Description |
|---|---|
| >0 | If the value is positive, the stored procedure was completed successfully. The value shows the batch ID that was assigned to the import in the Controller database. |
| -1010 | The import specification that you entered is not found or not valid. |
| -1020 | The import specification parameter that you have entered is not found or not valid. |
| -1030 | The Controller user that you entered is not found. |
| -1040 | There is an invalid parameter for pSchedType. |
| -1050 | You can use schedule type 0 only when you import structures. |
| -1060 | No rows were updated in the staging table. You may have entered an incorrect import ID. |
| -2100 | An error occurred when the batch ID was incremented. |
| -2200 | An error occurred when the batch job was added to the batch queue. |
| -2300 | An error occurred when the rows of the staging table were connected to a specific batch ID. |