SET_TERM_INQUIRE utility: ------------------------- Overview: --------- The SET_TERM_INQUIRE utility is a replacement for the DCL command "SET TERM/INQUIRE". This implementation fixes several bugs in the regular VMS version. This program is intended to be run from a system's SYLOGIN.COM or a user's LOGIN.COM. There are no run-time options. You simply use a "$ RUN SYS$SYSTEM:SET_TERM_INQUIRE" instead of the usual "SET TERM /INQUIRE". To install for personal use: ---------------------------- Edit LOGIN.COM to include: $ RUN SYS$LOGIN:SET_TERM_INQUIRE Make sure that your system does NOT have a SET TERM /INQ in SYLOGIN.COM, or if it does, make sure it doesn't run it for your username. Note: If you are running VMS earlier than version V5.2, you need to rebuild from the .OBJ file. See the section below about "rebuilding from sources". To install for system-wide use: ------------------------------- Edit SYLOGIN.COM to include: $ RUN SYS$SYSTEM:SET_TERM_INQUIRE Be sure to remove any SET TERM /INQUIRE. Best is to replace the SET TERM /INQ with a $ RUN SYS$SYSTEM:SET_TERM_INQUIRE. See note above about VMS version compatibility. Features over SET TERM /INQ are: -------------------------------- - This program produces correct results in the following cases, whre VMS sets the wrong width and height: - VT100 in 132 column mode, without AVO (132x14). - VT100 in 132 colun mode with AVO (132x24). - VWS terminal emulator when sized other than 80x24. - DECWindows terminal emulator when sized other than 80x24. - VT330/340 in 2-pagex36 line or 1-pagex72 line mode. - VT420 in 2-pagex36 line or 1-pagex72 line mode. - This program is much faster than DCL when inquiring DEC Level 3 terminals such as VT320 and VT330, because the Ansi inquire is done before the VT52 inquire. - This program WILL NOT resize your workstation terminal emulator back to 24 lines, as DCL does. Instead, it will tell VMS what the actual size is. - This version produces correct terminal width and height when used with SET HOST /DTE and workstation terminals. - This program will exit cleanly with no error in cases where the SYS$OUTPUT device is not a terminal, such as when starting up a DECwindows session manager, or a batch job. You don't need to condition running this program on "interactive" or on the controlling terminal device type. - As distributed, this program will exit cleanly without inquiring the terminal type when using a SET HOST terminal (RT device names). This is the correct configuration for use in SYLOGIN.COM, but this can be disabled as a compile-time option. - The DCL symbol TTY$MODEL0 is set to indicate the actual terminal type, obtained from the terminal's secondary attributes. A value of "0" indicates that the terminal is not a level 2 or higher video terminal (VT52, VT100, etc.). - A value of "29" is the VWS terminal emulator. - A value of "28" is the DECterm terminal emulator. - "1" is VT220, "2" is VT240, "18" is VT330, "19" is VT340. Other values are listed in DEC STD 138 or the terminal manual. If additional secondary attributes exist (usually a software/firmware version number), they appear as TTY$MODEL1 througn TTY$MODELn. This feature can be disabled at compile time. An attempt was made to set the attributes correctly for every terminal listed in DEC STD 138, including hardcopy terminals. The program has been tested for proper operation with: - DECwindows terminal emulator. - VWS terminal emulator with and without ReGIS. - VT420. - VT330/340. - VT220 - VT100, with and without AVO I have not tested any others, but they should work: - VT50, VT52, VT61, etc. - LA120 - LA34 - LA12 - LA100 etc. Note that the VT05, LA30, and LA36 do not support the escape sequences needed for the program to work. If you discover a terminal that this program does not correctly inquire, please send me the details and I will attempt to update it accordingly. Also, if you can confirm that it works right on any terminal I haven't listed here (without, for example, leaving your VT52 in holdscreen mode), let me know so that I can update this document. Rebuilding from sources: ------------------------ If you are running VMS V4.x, V5.0, or V5.1, you need to relink. Copy the "for personal use" files, so that you have SET_TERM_INQUIRE.OPT and SET_TERM_INQUIRE.OBJ, and issue the command: $ LINK SET_TERM_INQUIRE/OPT to build a new SET_TERM_INQUIRE.EXE that will work on your system. If you wish to modify the behavior of the program, the source file is provided. The entire program is in this one module SET_TERM_INQUIRE.C. One supported compile time option is the supression of inquire on SET HOST lines. If you wish the inquire to work on all lines, change the line #define IGNORE_SET_HOST 1 to read: #define IGNORE_SET_HOST 0 recompile with $ CC SET_TERM_INQUIRE and link as described above. Any version of VAXC should suffice. I used V3.0. It would also be fairly simple to modify this program to provide more detail to applications via DCL symbols. If you have applications that are interested in the device attributes that are given by the terminal's device attributes response, but do not have a corresponding VMS terminal attribute, these can be set up. It would also be possible to query and report the secondary device attributes as well. Let me know if you are interseted in these changes.