[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP OpenVMS DCL Dictionary
SET CONTROL
Enables or disables the Ctrl/Y or the Ctrl/T function. Pressing Ctrl/Y interrupts a command and returns you to the DCL command level. Pressing Ctrl/T momentarily interrupts a command to print a line of statistics. FormatSET CONTROL [=(T,Y)] Parameter
DescriptionThe Ctrl/Y function provides a general-purpose escape from the current operation. The Ctrl/Y function can generally be used during an interactive terminal session to interrupt the current command, command procedure, or program image. Customizing the Output of Ctrl/T By defining the new symbol DCL$CTRLT, users can augment the traditional Ctrl/T output with the text defined for DCL$CTRLT. This technique can be used to indicate progress in user applications or for debugging purposes.
|
#1 |
---|
$ SET NOCONTROL=Y |
The SET CONTROL command in this example disables the Ctrl/Y function as well as most Ctrl/C functions.
#2 |
---|
$ SET CONTROL=T |
The SET CONTROL command in this example enables the Ctrl/T function.
#3 |
---|
$ SET NOCONTROL=(T,Y) |
The SET CONTROL command in this example disables both the Ctrl/T and Ctrl/Y functions.
#4 |
---|
$ []Ctrl/T NODE22::SMITH 16:21:04 (DCL) CPU=00:03:29.39 PF=14802 IO=18652 MEM=68 $ SET NOCONTROL=T $ []Ctrl/T |
As shown in this example, when you press Ctrl/T, the system displays the appropriate information. The SET NOCONTROL=T command disables the Ctrl/T function. Now when you press Ctrl/T, no information is displayed.
#5 |
---|
$ TYPE CTRLT_LOOP.COM $ inner=0 $ outer=0 $ loop: $ loop1: $ if inner .gt. 20000 then goto end_loop1 $ inner=inner+1 $ dcl$ctrlt=F$FAO("Inner loop count is !SL Outer loop count is !SL" ,inner,outer) $ goto loop1 $ end_loop1: $ inner=0 $ outer=outer+1 $ goto loop $ @CTRLT_LOOP <<Press Ctrl/T>> NODE1::JSMITH 10:46:37 (DCL) CPU=00:03:42.68 PF=13453 IO=6743 MEM=187 Inner loop count is 12306 Outer loop count is 0 NODE1::JSMITH 10:46:43 (DCL) CPU=00:03:49.19 PF=13455 IO=6744 MEM=187 Inner loop count is 19200 Outer loop count is 2 . . . <<Press Ctrl/C>> <<--- To exit the loop. $ SET NOCONTROL=T $ @CTRLT_LOOP <<Press Ctrl/T>> <<Nothing is displayed as CTRL/T is disabled.>> <<Press Ctrl/C>> <<--- To exit the loop. |
This example demonstrates the use of DCL$CTRLT within a command procedure. The command procedure is running in a loop that updates the symbol DCL$CTRLT to indicate the number of loop iterations executed so far.
1 Note that DCL maintains a pending Ctrl/Y asynchronous system trap (AST) to the terminal driver. This affects captive command procedures when using the SET HOST command. For more information, see the description of the SET HOST command. |
Previous | Next | Contents | Index |