Accepting Input from HI Commands

EXCEPTIONEVENT is an event-valued task attribute, meaning that it has either of two states: HAPPENED or NOT HAPPENED. The HI command causes the EXCEPTIONEVENT, meaning that the value is changed to HAPPENED. This action has no effect on process execution unless the program is specifically designed to monitor the status of the EXCEPTIONEVENT. Only programs written in WFL, ALGOL, or COBOL have access to this attribute.

A program can monitor the EXCEPTIONEVENT in any of the following ways:

  • To suspend execution until the EXCEPTIONEVENT is caused, the process can use a simple wait statement such as WAIT(MYSELF.EXCEPTIONEVENT) in ALGOL or WAIT; in WFL.

  • To suspend execution until either the EXCEPTIONEVENT or some other event occurs, the process can use a complex wait statement that lists the EXCEPTIONEVENT as one of several events.

  • To continue doing other work until the EXCEPTIONEVENT is caused, the process can attach an interrupt to the EXCEPTIONEVENT.

In addition to causing the EXCEPTIONEVENT, the HI command can also pass an assignment to the TASKVALUE task attribute of the process. For example, the command 3874 HI 14 causes the EXCEPTIONEVENT of the process with mix number 3874 and assigns a TASKVALUE of 14. To design a process to use this type of input, you must first use a wait statement or interrupt to monitor the EXCEPTIONEVENT. Whenever the EXCEPTIONEVENT occurs, the process can read its own TASKVALUE and take appropriate action.