HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary

Previous Contents Index


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.

SET CONTROL=T requires that SET TERMINAL/BROADCAST be set for the information to be displayed at your terminal.






Specifies that T (Ctrl/T) or Y (Ctrl/Y) be enabled or disabled. If you specify only one character, you can omit the parentheses. If you do not specify either T or Y, Y is the default.


The 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.

The SET NOCONTROL=Y command can be used for special application programs. When the SET NOCONTROL=Y command is executed in a system-specified command procedure for a particular user at login, that user can communicate only with the application program that controls the terminal.

When you press Ctrl/Y and SET NOCONTROL=Y is in effect, the INTERRUPT message is displayed, but no interruption takes place.1

SET NOCONTROL=Y also disables the Ctrl/C cancel function for all commands and programs that do not have special action routines responding to the Ctrl/C function.

The Ctrl/T function displays a single line of statistical information about the current process. When you press Ctrl/T during an interactive terminal session, it momentarily interrupts the current command, command procedure, or image to display statistics. The statistical information includes the node and user names, the current time, the current process, CPU usage, number of page faults, level of I/O activity, and memory usage. For example:

BOSTON::SMITH  16:21:04 EDT       CPU=00:00:03.33 PF=778 IO=296 MEM=277 

When SET NOCONTROL=T (the default) is in effect, pressing Ctrl/T does not cause any statistics to be displayed.

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.




The SET CONTROL command in this example disables the Ctrl/Y function as well as most Ctrl/C functions.



The SET CONTROL command in this example enables the Ctrl/T function.



The SET CONTROL command in this example disables both the Ctrl/T and Ctrl/Y functions.


$ []Ctrl/T
NODE22::SMITH 16:21:04 (DCL) CPU=00:03:29.39 PF=14802 IO=18652 MEM=68
$ []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.


$ 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 
<<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. 
<<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