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

Defining and Using Action Function Keys
Interaction With Users and Terminals
106160 Tandem Computers Incorporated 13–9
The following example shows how to define and use an action function key. The SF1
function key is defined as an action function key in this example. The key is associated
with an NCL procedure that, when the key is pressed, turns the roll-delete message
next to which the cursor is positioned into a non-roll-delete (NRD) message with the
OPER attribute. This allows you to retain a certain message on an OCS window until
you choose to remove it by using NRD cursor deletion.
To see how this example works, follow these steps:
1. Type the NCL procedure to associate with the action function key as shown,
calling it ZEX1305N:
zex1305n: PROCEDURE
/* When associated with an action function */
/* key, turns the roll-delete message next */
/* to which the cursor is positioned in an */
/* OCS window to a NRD message with the */
/* OPER attribute. */
ON ERROR RESUME
/* If no parameters specified, use defaults */
&alarm = NO
&color = NONE
&hlite = NONE
IF &1 \= "" THEN &alarm = &1
IF &2 \= "" THEN &color = &2
IF &3 \= "" THEN &hlite = &3
IF &$PRM. \= "" THEN
WRITE NRD=OPER,
ALARM=&alarm,
COLOR=&color,
HLITE=&hlite,
DATA="-> "&SYS.TIME &$prm.text
end zex1305n
In this NCL procedure, the WRITE verb turns the message in the &$PRM. MDO
variable into a NRD message with the OPER attribute. When displayed, the
message is preceded by an indicator (->) and the current time.