OpenVMS - issinoho/veetee GitHub Wiki

OpenVMS

veetee is developed against OpenVMS hosts and aims to behave exactly like a DEC terminal for DCL and screen applications.

Connecting

veetee --telnet vms1                  # TELNET service (TCP/IP Services, MultiNet, TCPware)
veetee --ssh system@vms1              # SSH server on OpenVMS
veetee --serial /dev/ttyUSB0          # console or terminal port, 9600 8N1 XON/XOFF
veetee --serial COM3                  # the same from Windows

Telnet sessions are 7-bit unless you ask for more: OpenVMS answers the Telnet BINARY option by putting the terminal in PASSALL, where DELETE stops erasing and DCL command recall goes with it. Add --telnet-binary for 8-bit controls on a host that handles them. See Connections.

Terminal characteristics

After logging in, let OpenVMS identify the terminal:

$ SET TERMINAL/INQUIRE
$ SHOW TERMINAL

/INQUIRE sends a Device Attributes request; veetee answers as the selected model (a VT420 by default, see Terminal Models), and OpenVMS sets the device type and its capabilities from the reply. To make it permanent, and to cover SSH, which cannot be asked, use the block in LOGIN.COM below.

With --model vt520 or --model vt525 the reply identifies a VT500-series terminal instead, for applications that use VT500 features such as colour.

/INQUIRE also puts the terminal in VT200 mode: after the reply OpenVMS sends CSI 62 " p (DECSCL, VT200 mode) and 7-bit controls, over Telnet, LAT and serial lines alike, and veetee, like a DEC terminal, then works at that level until told otherwise. It matters only for what a host sends above it — the VT500 series' DECSCS, which sets the line's speed, among them; a procedure that uses one selects the level first with CSI 65;1 " p, which also resets the terminal.

SSH sessions need the device type set by hand

/INQUIRE only reaches a terminal over Telnet, on the _TNAn: devices. On the pseudo-terminals an SSH server creates, _FTAn:, it is silent: OpenVMS sends no Device Attributes request at all, so there is nothing for veetee to answer, and the terminal type SSH carries in its pty-req is ignored as well. The device keeps the type it was created with — a VT102 on OpenVMS V8.4-2L3 with TCP/IP Services — and SHOW TERMINAL then reports No Eightbit, No Soft Characters and none of DEC_CRT2, DEC_CRT3 or DEC_CRT4, whatever model veetee is set to.

So for those devices the type is set by hand, as the LOGIN.COM block below does. /PRINTER_PORT and /SOFT_CHARACTERS are in it because /DEVICE_TYPE does not set everything the inquiry does: veetee's DA1 reports a printer port — parameter 2, as the hardware did — and soft characters, so a Telnet session comes up with both set and an SSH session configured by device type alone does not. The printer port matters when something on the host drives it, which from 1.5.0 veetee prints — to a PDF or a real printer, and DSR then answers CSI ? 10 n, printer ready; see Printing.

To see which of the two is happening on your own system, record a login and look for the request:

veetee --record inquire.vtrec --ssh system@vms1

Over Telnet the recording holds an H line carrying ESC [ c and the R line answering it, for a VT420 ESC [ ? 64;1;2;6;7;8;9;15;18;21 c. Over SSH it has neither, and no R lines at all.

LOGIN.COM

Everything above, and what printing and pasting need, in one block for LOGIN.COM:

$! Terminal settings for veetee.
$ IF F$MODE() .NES. "INTERACTIVE" THEN GOTO terminal_done
$ tt = F$GETDVI("TT","DEVNAM")
$ IF F$LOCATE("FTA",tt) .LT. F$LENGTH(tt)
$ THEN
$!  SSH: OpenVMS asks the terminal nothing, so say what it is.
$   SET TERMINAL/DEVICE_TYPE=VT400_Series/EIGHTBIT -
        /SOFT_CHARACTERS/PRINTER_PORT
$ ELSE
$!  Telnet, LAT, DECnet, serial: the terminal answers for itself.
$   SET TERMINAL/INQUIRE
$ ENDIF
$! Every connection: make veetee wait when the type-ahead buffer fills.
$ SET TERMINAL/HOSTSYNC
$terminal_done:
  • F$MODE(): LOGIN.COM runs for batch and network jobs too, which have no terminal. The GOTO skips only this block.
  • SSH (_FTAn:) is told the type, since OpenVMS cannot ask. /EIGHTBIT because SSH carries 8-bit data, and veetee shows DEC Supplemental characters (é, ñ, £), which /NOEIGHTBIT would strip; a Telnet or LAT session gets Eightbit from the inquiry. Use VT500_Series with --model vt520 or --model vt525. It sets any SSH client up as a VT400, not only veetee.
  • Telnet (_TNAn:), LAT (_LTAn:), DECnet SET HOST (_RTAn:) and serial lines (_TTAn:, _TXAn:, the console) are asked, so veetee answers as whichever model it is running. Over Telnet OpenVMS has already asked at login; a serial line is asked only here. Over DECnet the request goes back through the session SET HOST was typed in, to veetee.
  • /HOSTSYNC everywhere: OpenVMS sends XOFF when its type-ahead buffer fills, and veetee stops sending until XON — over Telnet, SSH and LAT from 1.5.0, and on a serial line through the port's flow control. Without it a long paste at the DCL prompt ends in DATAOVERUN.

Left out on purpose: /WRAP, which OpenVMS sets and veetee's Auto Wrap matches; the page size, which SSH carries and applications change; and anything for Kermit, which sets the terminal as it needs during a transfer, or for printing, which LPRINT.COM (Printing) sets around the job. Check the result with SHOW TERMINAL over each connection you use. Over SSH, LAT, Telnet, a DECnet SET HOST 0 and a serial terminal port (_TTA0:) on OpenVMS IA64 (September 2026) it shows the same: VT400_Series with Eightbit, Soft Characters, Printer port and Hostsync, and DEC_CRT to DEC_CRT4 — SSH by the device type it is told, the others by the inquiry.

You can also set characteristics explicitly:

$ SET TERMINAL/DEVICE_TYPE=VT400/EIGHT_BIT
$ SET TERMINAL/WIDTH=132
$ SET TERMINAL/PAGE=24

Applications

These rely on DEC features that veetee implements:

Application Features used
EDT, EVE/TPU Application keypad (PF1 Gold), editing keypad, scrolling regions, Help and Do keys
DECforms, FMS Protected fields and selective erase, DEC Special Graphics boxes, status line, double-size lines, 132-column mode
SMG$ screens Scrolling regions, line drawing, insert/delete line, video attributes
MAIL, PHONE, MONITOR Cursor positioning, double-size lines, 132 columns
DCL line editing Arrow keys, Ctrl keys, answerback

Keyboard layout: Keyboard. In EDT and EVE, Num Lock is Gold (PF1) and keypad / is Help (PF2).

Recording applications for testing

Real sessions become regression tests. Record one with checkpoints at the screens that matter:

veetee --model vt420 --record edt-keypad.vtrec --telnet vms1

Log in, work through the application, and press Ctrl+Shift+M at each screen worth checking. Then replay it:

vt-headless replay edt-keypad.vtrec --bless    # writes edt-keypad/checkpoint-01.screen, …

Read each screen against what the session showed. Recordings that are right go in tests/conformance/openvms/, where cargo xtask openvms replays them in CI. The checklist of applications still to record (EDT, EVE/TPU, MAIL, FMS, DECforms, MONITOR, SMG$ and SET TERMINAL/INQUIRE) is in that folder's README.

Typed keys are left out of a recording unless you add --record-keys, but everything OpenVMS prints is kept — the node name, the user name it echoes, file contents. Save recordings outside your git checkout and review them before sharing.

If a screen does not look right, please open an issue with a recording attached.

Tips

  • If DCL line editing or EDT keys behave oddly, check SHOW TERMINAL for the device type and whether ANSI_CRT, DEC_CRT (2–4) and EIGHT_BIT are set.
  • Hold Screen (F1) holds output without losing any, which is handy for long TYPE output.
  • SET TERMINAL/HOSTSYNC — best in LOGIN.COM — lets OpenVMS ask veetee to wait when its type-ahead buffer fills, which veetee honours from 1.5.0. Without it, a long paste at the DCL prompt ends in DATAOVERUN; with it, 200 lines pasted into CREATE arrive whole.
  • To print a file on the printer at your desk, see the LPRINT.COM procedure in Printing.
  • The default VT420 scrolls smoothly, which makes long output slow; choose Jump Scroll in Display Set-Up and Save if you prefer speed.
  • Double-click selects a whole file specification, ready to paste into a command.