What is a condition in Language Environment?

Language Environment defines a condition as any event that can require the attention of a running application or the HLL routine supporting the application. A condition is also known as an exception, interrupt, or signal. Language Environment makes it possible to respond to events that in the past might have caused a routine to abend, including hardware-detected errors or operating system-detected errors.

All of the following can generate a condition in Language Environment:
Hardware-detected errors
Also known as program interruptions, these are signaled by the central processing unit. Examples are the fixed-overflow and addressing exceptions. The operating system derives the error codes from the codes defined for the machine on which the application is running. The error codes differ from machine to machine.
Operating system-detected errors
These are software errors and are reported as abends. An example is an OPEN error.
Software-generated signals
Signals are conditions intentionally and explicitly created by Language Environment (using CEESGL), language library routines, language constructs (such as C's raise() or PL/I's SIGNAL), or user-written condition handling routines.

Under Language Environment, an exception is the original event, such as a hardware signal, software-detected event, or user-signaled event, that is a potential condition. Through the enablement step (described briefly in Steps in condition handling and in detail in Language Environment and HLL condition handling interactions), Language Environment might deem an exception to be a condition, at which point it can be handled by Language Environment, user-written condition handlers, if they are present, or HLL condition handling semantics.