VMS Help  —  COBOL  Compiler Messages, ACCEXCEPT
  DISPLAY now allows [NOT] ON EXCEPTION - check DISPLAY scope within
  ACCEPT ON EXCEPTION

  Explanation:  Format 6 of the DISPLAY statement with the [NOT] ON
  EXCEPTION phrase is a conditional statement and may require the use
  of END-DISPLAY to determine the proper scope of the DISPLAY statement.

  User Action: Verify the scope of the DISPLAY statement in the program
  logic. You may need to insert a terminating "end-display".

  For example, consider this code fragment:

     accept password-form at line 15 column 20
         on exception
             display "Problem " line 16
         not on exception
             continue
     end-accept.

  The "not on exception" is NOT matched with the "accept" as shown by the
  indentation, but is matched with nearest preceding unterminated
  statement, the "display". To match the "not on exception" phrase with
  the "accept" insert an "end-display" so the code looks like:

     accept password-form at line 15 column 20
         on exception
             display "Problem " line 16
             end-display
         not on exception
             continue
     end-accept.
Close Help