DISPLAY "An error occurred with " tracked-resource UPON SYSERR
DISPLAY A, B, C UPON CONSOLE
DISPLAY group-data UPON user-device
ON EXCEPTION
WRITE device-exception-notice
NOT ON EXCEPTION
WRITE device-usage-log
END-DISPLAY
UPON CONSOLE is a default, rarely written. Messages with DISPLAY are one way of debugging COBOL code, but many COBOL programs are transactional in nature, and might not ever interact with a human operator once a job is submitted.