NET/MASTER Network Control Language (NCL) Programmer's Guide

Obtaining Input From a Panel
Working With Panels
14–72 106160 Tandem Computers Incorporated
Handling Input From
Asynchronous Panels
When an NCL process executes an asynchronous panel, the PANEL verb does not wait
for input from the terminal. Another mechanism is needed to tell the NCL process
when input is received. The mechanism used is the INTREAD verb and the
dependent request queue of the NCL process that issued the PANEL verb.
The mechanism works in the following way. When the NCL process reaches a point in
its logic where it needs to wait for input from the terminal, it issues the following
statement:
INTREAD TYPE=REQ
This automatically places the NCL process in a wait state until a request message
arrives on its dependent request queue.
When input is entered by the operator, a notification message is delivered to the
dependent request queue. This satisfies the INTREAD verb and the NCL process
continues execution. By examining the contents of the notification message the NCL
process can determine that it is notification of a panel event occurring on a
synchronous panel.
It is important to note that the message is only a notification that a panel event has
occurred; the action taken by the NCL process after reading the message depends on
the event. The notification message is the following:
NNM1399 NOTIFY: PANEL EVENT:
event
OBJECT:
object
event
specifies the type of input activity. Table 14-12 summarizes the possible events.
object
specifies the name of the panel into which input is entered.
Table 14-12. Event Notification for Asynchronous Panels
Event Meaning and Action
INPUT Specifies that input was received from the terminal. To make the input available in
the associated panel input variables, the NCL process must issue another PANEL
TYPE=ASYNC statement. This redisplays the panel and reflects any changes.
CHANGE Specifies that terminal window conditions have changed. This indicates that a
SPLIT or SWAP operation occurred. To store the new window dimensions in the
&SYS.WINDOWS.ROWS and &SYS.WINDOWS.COLS system variables, the
NCL process must issue another PANEL TYPE=ASYNC statement.
TAKEOVER Specifies that another NCL process attempted to take over the window. The NCL
process is notified of this event only if CONTROL NOSHAREW is currently set.
To allow another NCL process to acquire ownership of the window, the NCL
process can issue either a PANELEND statement or a CONTROL SHAREW
statement.