| This is great stuff - I've needed it for a while. (I've had half a
solution for a long time, but never finished it.) I use it as follows
from SYS$MANAGER:SYLOGIN.COM:
$! Determine terminal type. Don't inquire types that are already known
$! to the system. RT's are given proper info from the remote node, and
$! should be trusted. WT's and TK's are properly set up by VWS. All
$! others get /INQUIREd and queried from width and height by TTSETUP.
$! Error messages are supressed, and the user is warned if their
$! terminal is not known to VMS.
$!
$ line = F$logical("TT") - "_" - "_"
$ IF "''f$extract(0,2,line)'" .EQS. "RT" THEN GOTO rt_no_inquire
$ IF "''f$extract(0,2,line)'" .EQS. "WT" THEN GOTO rt_no_inquire
$ IF "''f$extract(0,2,line)'" .EQS. "TK" THEN GOTO rt_no_inquire
$ SET TERM/UNKNOWN
$ Set term/NoTypeAhead !Drop extra characters in bit bucket
$ ASSIGN/USER/NOLOG NL0: SYS$OUTPUT ! Eliminate error messages
$ ASSIGN/USER/NOLOG NL0: SYS$ERROR ! Ditto
$ Set term/inquire
$ IF .NOT. $STATUS THEN $ WRITE SYS$OUTPUT "Warning terminal type is UNKNOWN."
$ run sys$system:ttsetup.exe
$!
$RT_no_inquire:
$ WRITE SYS$OUTPUT "Go!"! Let the user know it's okay to type now.
$ set term /line/insert/typeahead
$!
|
| Tell VMS to set the terminal width and page length to the settings
currently set on the display being used, provided it is some sort of
DEC/ANSI terminal like the VT100/VT200 or emulator. It uses the
cursor position report to determine the current settings, by attempting
to set the cursor to row 100, colume 200. TTSETUP then reads back where
the cursor was positioned to determine the page length and width.
It has two switches if defined as a foreign command (TTSETUP :== $TTSETUP).
-n - noisy, print the width and length being set
-b - bell, ring the bell on the terminal when complete
The switches can be combined (e.g. "TTSETUP -n -b").
|