NET/MASTER Network Control Language (NCL) Reference Manual
PAUSE
Verbs
106126 Tandem Computers Incorporated 3–151
Examples
The following example uses two instances of the PAUSE verb to request responses
from the operator. The procedure tests the initial response, and if it is “GO YES,” a
further response is requested. This last response is split into variables &20 through
&22:
PAUSEX:PROCEDURE
WRITE DATA="ENTER ""GO YES"" TO CONTINUE, ""GO NO"" TO END".
LABEX:
PAUSE ARGS
IF &1 = NO THEN EXIT
IF &1 = YES THEN GOTO LAB1
ELSE SAY "AN ERROR HAS OCCURRED - TYPE
""GO YES"" OR ""GO NO"""
GOTO LABEX
LAB1:
PAUSE ARGS RANGE=(20,22),
DATA="PAUSED AGAIN. ENTER "GO" ONCE MORE"
EXIT
END PAUSEX
The following example reads the operator response text and splits the message into
individual words:
PAUSE VARS=(*(3),&A(2),&B(3),&C,&D,&E,&F)
In the previous example, the first three words are ignored, two characters of the next
word are placed in the variable &A, and three characters of the next word are placed
in the variable &B. The next four words are placed in the variables &C, &D, &E, and
&F. Any remaining characters in the string are not available.
The following example waits for the next log message, then splits it and places the text
into a series of automatically generated variables of the form ABC1, ABC2, and so on.
As many variables as required are generated, to the limit specified by the RANGE
operand-in this case, from 1 through 50:
PAUSE VARS=&ABC* RANGE=(1,50)