ILE COBOL Language Reference

ON OVERFLOW Phrases

Imperative-statement-1 is executed when:

When any of the above conditions occurs:

  1. An overflow condition exists, and no more data is transferred
  2. The UNSTRING operation is terminated
  3. The NOT ON OVERFLOW phrase, if specified, is ignored
  4. Control is transferred to the end of the UNSTRING statement or, if the ON OVERFLOW phrase is specified, to imperative-statement-1.

If control is transferred to imperative-statement-1, execution continues according to the rules for each statement specified in imperative-statement-1. If a procedure branching or conditional statement that causes explicit transfer of control is executed, control is transferred according to the rules for that statement; otherwise, upon completion of the execution of imperative-statement-1, control is transferred to the end of the UNSTRING statement.

If conditions that would cause an overflow condition are not encountered, the ON OVERFLOW phrase, if specified, is ignored. If the NOT ON OVERFLOW phrase is specified, control is transferred to imperative-statement-2; otherwise, control is transferred to the end of the UNSTRING statement.

If control is transferred to imperative-statement-2, execution continues according to the rules for each statement specified in imperative-statement-2. If a procedure branching or conditional statement that causes explicit transfer of control is executed, control is transferred according to the rules for that statement. Otherwise, upon completion of the execution of imperative-statement-2, control is transferred to the end of the UNSTRING statement.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]