[comp.os.vms] SET TERMINAL/MESS_UP_SETTINGS

smith%eri.DECnet@MGHCCC.HARVARD.EDU ("ERI::SMITH") (06/10/87)

I was recently surprised to discover if a VT240 is set for "VT100 mode,
VT240 ID," the command

	$ SET TERMINAL/INQUIRE

will change it to "VT200 mode, 7-bit controls."  The analogous thing
happens on a VT220.

Did it always do this, or is this a VMS 4.5 innovation?  Should I
be irritated by this, and, if not, why not?
--------------------------------------------------------------------
Daniel P. B. Smith         ARPA: smith%eri.decnet@mghccc.harvard.edu
Eye Research Institute     CompuServe: 74706,661
20 Staniford Street        Telephone (voice): 617 742-3140
Boston, MA 02114
--------------------------------------------------------------------
"We are in great haste to construct a magnetic telegraph from Maine to
Texas; but Maine and Texas, it may be, have nothing important to
communicate."--Thoreau
------

jeff@umbc3.UUCP (06/12/87)

In article <8706120323.AA09180@ucbvax.Berkeley.EDU> "ERI::SMITH" <smith%eri.decnet@mghccc.harvard.edu> writes:
>I was recently surprised to discover if a VT240 is set for "VT100 mode,
>VT240 ID," the command
>
>	$ SET TERMINAL/INQUIRE
>
>will change it to "VT200 mode, 7-bit controls."  The analogous thing
>happens on a VT220.
>
It has always done this, atleast since 4.0. It annoyed me enough, since
I typically needed backspace and the escape character to add a line to
my login.com file which sets the terminal back once SET TERM/INQUIRE
changes it. I got it from the VT240 programmer's manual. It is 
			<ESC>[61"p 

Jeffrey Burgan            Systems Staff          University of Maryland
ARPA: jeff@umbc3.umd.edu                         (301) 455-3631

LEICHTER-JERRY@YALE.ARPA.UUCP (06/18/87)

    I was recently surprised to discover if a VT240 is set for "VT100 mode,
    VT240 ID," the command
    
    	$ SET TERMINAL/INQUIRE
    
    will change it to "VT200 mode, 7-bit controls."  The analogous thing
    happens on a VT220.
    
    Did it always do this, or is this a VMS 4.5 innovation?  Should I
    be irritated by this, and, if not, why not?

It's been doing this since SET TERM/INQUIRE was invented (V4.0).  It does this
is that, having received an ID from the terminal saying "I'm a VT240", it is
going to set up the various terminal characteristics to say "there's a device
out there with (for example) ANSI_CRT DEC_CRT DEC_CRT2".  Program are supposed
to rely on these characteristics, not on particular terminal types - back in
the "good old days", there were tons of programs that ran on VT100's but would
fail on (functionally identical) VT102's, since they looked at the exact
device type.

Given that the terminal will be marked as having VT240 attributes, it had
better respond to VT240 controls - which it will NOT do while in VT100 mode.
So SET TERMINAL makes sure the terminal is set up to agree with the recorded
characteristics - just as SET TERM/WIDTH:132 sends an escape sequence to
actually switch the terminal to 132-column mode.

If you want your terminal to really look like a VT100 - only necessary for
old programs that rely on terminal types, not the encoded attributes - set
the terminal to "VT100 mode, VT100 ID" - that's exactly why that setting was
created.
							-- Jerry

(BTW, the reason for the "7-bit controls" is a bit more subtle, and essential-
ly a temporary work-around:  The RTL SMG input routines don't work with 8-bit
controls.  The problem is that in 8-bit mode, there are TWO encodings for
many things - e.g., either CSI or ESC [ is acceptable as a command sequence
introducer.  The SMG TERMTABLE facility has no way to specify such synonyms.
In 7-bit control mode, the terminal will always use the 7-bit representation,
and the problem goes away.  Note however that this only affects what represen-
tation the terminal will use when sending to the host - if the comm line pro-
vides an 8-bit path, you can use either representation when sending stuff to
the terminal.)
-------