FINISH condition

Indicates that a STOP statement has been executed, the main procedure has executed a RETURN statement or END statement, or the program is exiting because of an error condition not handled by any ON-unit.

Enabled/Disabled status

Always enabled.

Result

Control is passed to the FINISH ON-unit and processing continues; however, if an ON FINISH ON-unit executes a STOP statement, the result is undefined.

Raised

During execution of a statement that would terminate the procedures.

Note

The FINISH condition can affect termination in either of the following ways:

  • When the main procedure is PL/I and the termination is normal, gives control to the FINISH ON-unit, if established.
  • When the termination is abnormal, gives control to the FINISH ON-unit if established in an active block.

Other Information

Condition code
4
Implicit action
Does nothing and simply returns
Normal return
Processing picks back up at the point where the condition was raised, which is the statement following the SIGNAL statement if the condition was signalled.