ON

ON is a global condition function. During the execution of a JOB which includes ON statements, the test in the ON statement is performed after every step.

Syntax:

      *---------------------------------------------------------------
      *--- ON operands
      *--- // ON  condition [OR|AND condition]
      *        [GOTO label | CONTINUE ]
      *---------------------------------------------------------------
condition
Specifies the condition under which the action is to be taken. Takes any of the following forms:
  • $RC operator n - compares the return code to the numeric value n.
  • $CANCEL, if the cancel command has been given. Parsed but not processed*.
  • $ABEND, if the step has abended.
GOTO
Label to go to if the condition is satisfied.
CONTINUE
Continue processing at next step.
Note: The command and operand combinations listed in these topics are supported unless indicated as "parsed but not processed". Where indicated, this means:
  • Parsed but not processed - indicates that the command and the operand are not supported, however, Enterprise Developer parses it and, if it fails validation, a JCL error is generated.
  • Parsed but not processed* - indicates that a number of the operands for JCL and POWER commands (for example, any tape or volume-specific operands) do not apply in the Micro Focus Enterprise Developer environment. See General Differences.