The status of a Schedule Job is kept in the SCHSTATUS table. In version 5.4 and later a new table (SCHACTIVE) was introduced to contain the status entries of jobs that need to run and when they should run.
A schedule job state corresponds with the SCSSTATE field in the status table. For the most recent state of the job will be the SCSSTATE value with the status record with the greatest timestamp. For 5.4 and later, this is always in the SCHACTIVE table. The possible states of a schedule job status is describe in the table below.
State |
Description |
I |
Indicates that this status record represents that the job needs to run at the preferred start time (SCSPREFSTART). |
IF |
Indicates that the job is being rescheduled to run because of a previous failed attempt of executing the job. |
R |
Indicates that the job is currently running. The job starting running at the time recorded in the SCSACTLSTART field. The SCSQUEUE field indicates which JVM process is running the job. |
RF |
Indicates that the job is being run because of a previous failed attempt of executing the job. |
C |
Indicates that the job has finished running. The time the job finished is recorded in the SCSEND field. This particular execution of the job was successful. |
CF |
Same as state "C" except there was an exception while executing the job. This means the job failed to execute successfully. |
W |
Indicates that there is a check task command assigned to the job. This means that before the command is executed, there is a side process that will execute to determine whether the job really needs to be run. This saves the overhead of running a schedule job when it does not need to be run. (Mostly used for store level schedule jobs.) |