This example is a demonstration of how to use variables to display up to the minute status of jobs using a restart count. The restart count of a job determines how many times a failed job will restart before it is deemed a failed job. By displaying the status variables, the user can see an up to the minute status of the jobs and their restarts. The example uses SCHEDULE's status to track the job's status.
In the figure there are three variables displayed above the jobs UPDATE_A, UPDATE_B and UPDATE_C. These variables have no initial value but are changed by the commands in the job's COMMAND listing, For instance the commands for JOB_A are:
REM
REM This job just sets the status variable and waits a short interval.
REM On the first attempt the job will fail. Once restarted it
REM completes successfully.
REM
if schedule_restarting then schedule modify/variable sts_a
/value="Restarting"
if .not.schedule_restarting then schedule modify/variable sts_a
/value="Starting"
wait 0:0:5
schedule modify/variable sts_a /value="Updating"
wait 'p1'
schedule modify/variable sts_a /value="Finished"
wait 0:0:5
schedule modify/variable sts_a /value=""
REM
This command list is run each time the job is executed. The schedule_restarting is automatically set if the job is restarting. At this point the sts_a variable is set to "Restarting" which is displayed in the variable box on screen. If the job is not restarting, it continues through the command file, displaying the messages "Updating" and "Finished" finally. The value of the variable is then set to blank again.