Preventing Job Side Effects

The values of Boolean, integer, real, and string identifiers are retained across a halt/load. The values of job parameters are also retained. However, the following types of values are lost:

  • The values of the task attributes of the job, except for the MIXNUMBER task attribute and any task attributes assigned in the job attribute list. Thus, for example, values assigned to any task attribute using the MYJOB task variable are not retained.

  • The task attribute values of task variables declared in the job. Only task attribute values assigned in task variable declarations are retained.

  • The effects of the ST (Stop) system command. The effects of this command are not retained across a halt/load, because the ST system command simply assigns the STATUS task attribute a value of SUSPENDED.

  • The effects of any file attribute assignments that were executed after the file declaration in the job.

The ON RESTART statement can be used to specify actions that are taken immediately after a halt/load. Typically, the ON RESTART statement is used to restore the values of file and task variables before job execution continues.

Task equations included in task initiation statements are reexecuted when the task initiation statement is reexecuted. Therefore, the ON RESTART statement does not need to restore attributes specified in task equations.

The job can determine whether it has been restarted by interrogating the RESTARTED task attribute. This task attribute returns a value of TRUE if the job has been restarted.