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

Displaying a Panel
Working With Panels
106160 Tandem Computers Incorporated 14–55
Displaying a Panel An NCL process displays a panel using the PANEL verb. There are two types of
panels, each of which is displayed using the PANEL verb: synchronous and
asynchronous.
Displaying a Synchronous
Panel
A synchronous panel is displayed by an NCL process using the PANEL verb with the
TYPE=SYNC operand. Panel display is synchronous by default.
A synchronous panel is a panel designed for direct interaction with a user at a
terminal. It presents terminal output and accepts terminal input. After the panel is
displayed, the NCL process suspends execution and waits for input. After it receives
input, the NCL process continues execution.
Examples of input that cause an NCL process to continue execution include pressing
the ENTER key or a function key. When the NCL process begins execution, it begins
from the statement following the PANEL verb that displayed the panel. Typically, the
NCL process processes the data most recently entered from the terminal.
When displaying a synchronous panel, return code information in the
&SYS.RETCODE system variable is available only when CONTROL PANELRC is set.
The following example explicitly displays a synchronous panel called PNL001:
PANEL NAME=PNL001 TYPE=SYNC
Displaying an
Asynchronous Panel
An asynchronous panel is scheduled for display by an NCL process using the PANEL
verb with the TYPE=ASYNC operand.
Note Because an asynchronous panel is scheduled for display, it may not be displayed immediately.
An asynchronous panel is designed to allow the issuing NCL process to execute in
parallel with the display of the panel. The NCL process updates the panel display as it
receives news of events occurring, presenting up-to-date output to the terminal user.
The NCL process uses the INTREAD verb to detect input.
When displaying an asynchronous panel, return code information in the
&SYS.RETCODE system variable is always available regardless of the setting of the
CONTROL [NO]PANELRC verb.
The following example displays an asynchronous panel called PNL001:
PANEL NAME=PNL001 TYPE=ASYNC
Removing a Panel From
Display
You can use the PANELEND verb to explicitly remove a panel from an OCS window.
If an NCL process terminates while it is displaying a panel, the panel is automatically
removed from display.
In either case, the window is passed back to the control of OCS or to the control of the
next NCL process that wants to display a panel on the window.