NET/MASTER Network Control Language (NCL) Programmer's Guide
Obtaining Input From a Panel
Working With Panels
106160 Tandem Computers Incorporated 14–73
If an INPUT or CHANGE event occurs, it is recommended that the NCL process issue
another PANEL statement to place the input into the asynchronous panel. This
statement must specify the name of the panel being displayed when the INTREAD
verb was issued. When the PANEL verb completes it operation, the result of the
operation is placed in the &SYS.RETCODE system variable. If a PANEL verb specifies
the name of another panel after it reads a notification message, the input is no longer
available.
An NCL process can display an asynchronous panel in a DO loop, without waiting on
an INTREAD verb. Assume that new data is available from a user at a terminal. Then
a subsequent PANEL verb returns a value of 0 in &SYS.RETCODE indicating that
NCL variables have been updated. In other words, the flow of information is normally
from NCL to the screen. However, after a function key has been pressed, the PANEL
verb, when displaying an asynchronous panel, implements a flow in the opposite
direction: that is, from the screen to NCL. The value of 0 in &SYS.RETCODE marks
this opposite flow.
Coordinating Input
Notification
Input from a panel can be notified by completion of the PANEL verb and also by the
arrival of a trigger message on a dependent request queue. This means that an NCL
process has the ability to wait for more than one source of input to act as the trigger to
resume processing.
Consider an NCL procedure that is designed to maintain a dynamically updated
screen display. The panel has to be redisplayed with new information as soon as it
arrives and the NCL process may receive information from either another NCL
process or from the screen. Such an NCL process must be able to “listen” for new
information that is to be displayed and “listen” for input received from the terminal.
By designing the NCL procedure so that it receives all input using INTREAD
TYPE=ANY, it can receive both new display messages from other NCL processes, on
its dependent response queue, and also notification of screen input, on its dependent
request queue.
Using this technique allows an NCL process to have a single point in its logic at which
it may wait for multiple forms of input, thereby synchronizing its processing of
different input streams.