DEL Key Interrupts Process, XENIX

PSS ID Number: Q10365
Article last modified on 11-16-1992

2.10 2.20
XENIX

Problem:
   If the key labeled DEL in the lower-right corner of the numeric
keypad on the IBM AT keyboard is pressed while a XENIX COBOL program
is running, it has the same effect as pressing CTRL-\. The message
"Stopped by Interrupt Key" is generated and the program halts.
   This is a problem because someone can easily terminate a program in
the middle of a critical file update by accidentally pressing the DEL
key. It is helpful to have the CTRL-\ work; however, the DEL key
needs to disabled.

Response:
   A method for aborting out of a program is desirable. Providing an
interrupt key is a good method because it gives the COBOL run time a
chance to leave files in a clean state (all file buffers are flushed
and closed when the interrupt key is pressed).
   If an interrupt key were not implemented, you would have to power
down to get out of a program. There would be no other means of escape.
   You have complete control over what character is used for the
interrupt key. The command "stty intr CHAR" may be used to to set the
interrupt key to the character "CHAR." For more information, see the
Commands (C), stty (C) section in the "XENIX System /286 Operating
System Reference Manual Volume II."
   You also have complete control over what keys are used for editing
when running a COBOL program. You can change the editing keys by
modifying the termcap file.
   Please note that "/etc/termcap" is the default termcap file. You
may use any file as the termcap file by setting the environment
variable "TERMCAP" to the full pathname of the file to be used. See
Appendix D of the "Microsoft COBOL Compiler for XENIX: User's Guide"
for more information.
   To make the environment identical to MS-DOS, do the following:
   1. Set the interrupt character to CTRL-C, as follows:
      *     stty intr '^C'
   2. Set the character delete key to DEL, as follows:
      Copy /etc/termcap to another file (say /usr/JohnDoe/termcap)
         cp /etc/termcap /usr/JohnDoe/termcap
   3. Edit the termcap file, by adding the string DE=^? to the
      capabilities of the terminal to be used.
   4. Set the environment variables as follows:
      a. For CSH users, do the following:
      *           setenv TERMCAP /usr/JohnDoe/termcap
      *           setenv TERM whatever
      b. For BOURNE SHELL (SH) users, do the following:
      *           set TERMCAP /usr/JohnDoe/termcap
      *           export TERMCAP
      *           set TERM whatever
      *           export TERM
   The entries marked by an asterisk (*) must either be done every
time you log in, or they may be put in your .login or .profile file.

Copyright Microsoft Corporation 1992.