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

Delaying Execution for a Specified Time
Interaction With Users and Terminals
13–4 106160 Tandem Computers Incorporated
Delaying Execution for
a Specified Time
You can use the DELAY verb from an NCL process to suspend execution of the NCL
process for a specified number of seconds. This can be useful if you want an NCL
process to wait for another event to complete before continuing execution.
The DELAY verb can pause execution up to 3 hours. If you specify DELAY=0, the
DELAY verb is ignored. You can interrupt a suspended NCL process by using the GO
and FLUSH commands from the OCS command input line.
The following table has some examples of the DELAY verb:
Example Comment
DELAY 10.2 Delays execution for 10.2 seconds.
DELAY 0 Causes the DELAY verb to be ignored.
DELAY 10800 Delays execution for 3 hours.
The following example uses the DELAY verb to suspend execution for 10 seconds
before iterating a DO loop.
zex1302n: PROCEDURE
SAY "NCL ID of this NCL process is "&SYS.NCLID
DO &i = 1 TO 100
SAY "Iteration "&i" of DO loop"
SAY "Delaying execution for 10 seconds"
DELAY 10
END
END zex1302n
The following screen shows the results of executing the procedure:
(12:45) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX1302N
NCL ID of this NCL process is 1017
Iteration 1 of DO loop
Delaying execution for 10 seconds
Iteration 2 of DO loop
Delaying execution for 10 seconds
Iteration 3 of DO loop
Delaying execution for 10 seconds
Iteration 4 of DO loop
Delaying execution for 10 seconds
FLUSH ID=1017
NNM1022 FLUSH COMMAND ACCEPTED
NNM1004 NCLID 001017: ZEX1302N 4 ERROR FLUSH_ERROR CODE 31
NNM1021 ZEX1302N FLUSHED. NCLID 1017
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>