An event provides a means to synchronize simultaneously executing processes. An event can be used either to indicate the completion of an activity (for example, the completion of a direct I/O read or write operation) or as an interlock between participating programs over the use of a shared resource.
<event declaration>
┌◄───── , ─────┐ ──┬───────────┬─ EVENT ─┴─<identifier>─┴───────────────────────────────┤ ├─ PRIVATE ─┤ └─ PUBLIC ──┘
<event identifier>
An identifier that is associated with an event in an EVENT declaration.
<event array declaration>
──┬───────────┬─ EVENT ── ARRAY ───────────────────────────────────────► ├─ PUBLIC ──┤ └─ PRIVATE ─┘ ┌◄───────────────────── , ─────────────────────┐ │ ┌◄───── , ─────┐ │ ►─┴─┴─<identifier>─┴─ [ ──<bound pair list>── ] ─┴─────────────────────┤
<event array identifier>
An identifier that is associated with an event array in an EVENT ARRAY declaration.
An event array is an array whose elements are events. An event array can have no more than 16 dimensions.
Events can be used synchronously by explicitly testing the state of an event at various programmer-defined points during execution, or the events can be used asynchronously by using the software interrupt facility.
The PRIVATE and PUBLIC specifiers can only be used for events and event arrays that are declared within a structure block or a connection block. The PRIVATE specifier limits visibility of the event or event array to the scope of the structure block or the connection block. A PRIVATE event or event array element cannot be accessed using a structure or connection block qualifier. The PUBLIC specifier allows the event or event array element to be accessed using a structure or connection block qualifier. If neither PRIVATE nor PUBLIC is specified, the default value is PUBLIC and access to the event or event array element using a structure or connection block qualifier is allowed.
Events have two Boolean characteristics, happened and available. Each characteristic can be either TRUE or FALSE. Language constructs such as the SET, RESET, and CAUSE statements can be used to change the happened state of an event. The HAPPENED function returns the value of the happened state of an event. The FIX, FREE, and LIBERATE statements can be used to change the available state of an event. The AVAILABLE function returns the available state of an event.
The initial available state of an event is TRUE (available), and the initial happened state of an event is FALSE (not happened). For more information on events, refer to EVENT Statement. For more information on interrupts, refer to INTERRUPT Declaration. For more information on the AVAILABLE function and the HAPPENED function, see Intrinsic Functions.

