SETCTL
Modify the operation of control characters
|
|
VSupported on OpenVMS
|
|
xcall SETCTL(character, action[, character, ...])
Arguments
character
A field, literal, or record that contains the control character whose action is to be modified: (a)
‘C’ = Ctrl+C
‘T’ = Ctrl+T
‘Y’ = Ctrl+Y
action
An expression whose value specifies how the control character should operate: (n)
If character is ‘C’:
0 = Ignore Ctrl+C.
1, 2 = Generate fatal error.
If character is ‘T’:
0 = Disable Ctrl+T status display.
1 = Enable Ctrl+T status display.
If character is ‘Y’:
0 = Disable DCL break or quit character, ignore Ctrl+Y.
1, 2 = Disable DCL break or quit character, generate fatal error.
3 = Enable DCL break or quit character, ignore Ctrl+Y.
4, 5 = Enable DCL break or quit character, generate fatal error.
Discussion
The SETCTL subroutine modifies the operation of the characters Ctrl+C, Ctrl+T, and Ctrl+Y when they are input from the terminal. (If SETCTL or FLAGS subroutine flag 8 are not used, typing Ctrl+C or Ctrl+Y causes an immediate program exit, even from an I/O statement, due to the way AST routines handle Ctrl+C and Ctrl+Y.)
SETCTL affects only the execution of the program that invokes its action. The original settings are restored when the program is completed normally. If the program is aborted, the original settings may not be restored.
The following actions are equivalent to the specified SETCTL calls:
- Calling the FLAGS subroutine with flag 8 set is equivalent to calling SETCTL with Ctrl+C action equal to 0 (ignore) or Ctrl+Y action equal to 0 (DCL disable break, ignore).
- Calling the FLAGS subroutine with flag 8 reset is the default state for Synergy programs and is equivalent to calling SETCTL with Ctrl+C action set to 2 (generate fatal error) and Ctrl+Y action set to 3 (DCL enable break, ignore).
- Setting system option #16 is equivalent to calling SETCTL with Ctrl+Y action set to 2 (disable DCL break, generate fatal error).