A process can access a number of types of events that are never explicitly declared. Some of these are predeclared and always available. Others are created by the system in response to certain forms of the wait statement.
Two predeclared events that are associated with every process are the exception event and the accept event. You can access these events by using the EXCEPTIONEVENT and ACCEPTEVENT task attributes. A process can wait on, cause, or reset these events by way of their associated task attributes. The following ALGOL statement waits on the exception event of the process:
WAIT (MYSELF.EXCEPTIONEVENT);
The following COBOL statement has the same effect:
WAIT UNTIL EXCEPTIONEVENT OF MYSELF.
The following WFL statement has the same effect:
WAIT;
The accept event cannot be accessed in WFL. The ALGOL and COBOL syntax for accessing the accept event parallels that used for the exception event. In addition, COBOL allows the following special syntax for waiting on the accept event:
WAIT UNTIL ODT-INPUT-PRESENT.
You can access another predeclared event by using the LOCKED task attribute. This attribute translates Boolean assignments into procure and liberate statements. Thus, a statement that sets the LOCKED attribute of a process to TRUE has the effect of unconditionally procuring the predeclared event. Setting LOCKED to FALSE liberates the predeclared event. If LOCKED is already TRUE, then any processes that attempt to set LOCKED to TRUE are queued until another process sets LOCKED to FALSE. The main virtue of this task attribute is that it provides WFL jobs with an easy way of protecting a resource, even though WFL jobs cannot access events directly.
Certain types of objects have event-valued attributes associated with them. These objects include DCALGOL queues, Direct I/O buffers, port files, and remote files. Processes can wait on these event-valued attributes just as if they were explicitly declared events. For information about DCALGOL queues, refer to the DCALGOL Programming Reference Manual. For information about Direct I/O buffers, port files, and remote files, refer to the I/O Subsystem Programming Guide.
The WAIT statement in WFL can also include clauses that cause the job to wait until specified task attribute values or file attribute values are attained. Refer to the Work Flow Language (WFL) Programming Reference Manual for full details.

