Est. 1985 Intermediate

DECTPU

Digital's DEC Text Processing Utility, a block-structured procedural language for building text editors on VMS, in which the EVE editor, the EDT keypad emulator and the Language-Sensitive Editor are written.

Created by Digital Equipment Corporation (individual designers not credited in the manuals)

Paradigm Procedural, block-structured, domain-specific (text editing)
Typing Dynamic — any variable can hold any data type; built-ins check their argument types at run time
First Appeared 1985
Latest Version DECTPU V3.1 (1993) is the last version number in the documentation; DECTPU still ships with VSI OpenVMS

DECTPU, the DEC Text Processing Utility, is a programming language whose only job is building text editors. Digital Equipment Corporation shipped it with VAX/VMS in 1985 as VAXTPU, and every editor that VMS users met through the EDIT/TPU command is a DECTPU program. That includes EVE, the editor EDIT opens by default on OpenVMS today. Instead of giving users a fixed editor plus a macro language, DEC built a compiler, an interpreter, a screen manager and a library of buffer, window and pattern primitives. It then wrote its own editors in that language and gave customers the same tools.

The idea of an editor written in its own extension language is best known from Emacs. DECTPU took a different route. It is block-structured with PROCEDURE ... ENDPROCEDURE and IF ... ENDIF, it is compiled ahead of time into binary section files, it has a callable interface so other programs can embed it, and it had commercial support behind it for four decades.

History & Origins

VAXTPU arrives (1985)

DEC’s manuals do not credit the people who designed the language. The documents do, however, date its arrival fairly closely:

  • March 1985. The pocket guide for VAX Language-Sensitive Editor V1.0, written for VAX/VMS V4.0 or later, already describes calling “a specified VAXTPU procedure” and a “VAXTPU Command Mode”. LSE was a separately sold layered product, so VAXTPU existed inside it before the operating system bundled it.
  • July 1985. The VAX/VMS V4.2 release notes list VAXTPU among the release’s new features: “a new high-performance, programmable, text processing tool … designed to aid application and system programmers in the development of text processing interfaces.” V4.2 shipped two DEC-written interfaces, the EDT Keypad Emulator and EVE. Hunter Goatley’s VAX Professional article on the callable interface also says that VAXTPU “was introduced with VAX/VMS version 4.2.” DEC’s release-history table gives a submit date of 15 October 1985 for V4.2.

The 1984 date that sometimes appears for DECTPU could not be confirmed. Development must have started before the March 1985 LSE guide, but no dated source from 1984 was found. This page therefore uses 1985, the year of the earliest documents.

Growing up on VMS (1986–1991)

VAXTPU changed with almost every VMS release:

VMS releaseTPU / EVE change (per DEC release notes and manuals)
V4.2 (1985)VAXTPU introduced with the EVE and EDT Keypad Emulator interfaces
V4.4 (1986)VAXTPU 1.2: key maps and key-map lists; section-file type becomes TPU$SECTION; section files installable as shared images
V5.0 (1988)Default section file renamed TPU$SECTION.TPU$SECTION; logical names TPUINI/TPUSECINI become TPU$COMMAND/TPU$SECTION; EVE 2.0 publishes a supported EVE$ programming interface and the EVE$BUILD layering tool
V5.1 (1988)DECwindows VAXTPU (Version 2.2), with widget built-ins, for the new X11-based workstation environment
V5.3 (1989)“Enhanced VAX Text Processing Utility (TPU) and Extensible VAX Editor (EVE)” listed among the key enhancements

DECTPU (1990s onward)

The June 1990 manuals for VMS 5.4 still say “VAXTPU”, and so do the November 1991 release notes for VMS 5.5. By April 1993, when DEC published the manuals for DECTPU Version 3.1, the product was called the DEC Text Processing Utility. Those manuals cover both OpenVMS VAX and OpenVMS AXP (Alpha) and support DECwindows Motif. The rename therefore happened between late 1991 and early 1993, around the time of the port to Alpha. At the same point the documentation started expanding EVE as the Extensible Versatile Editor where it had once said Extensible VAX Editor.

Compaq’s 2001 edition of the guide notes that its content had not changed since OpenVMS 7.1. VSI’s current DECTPU manuals still reproduce the same screen showing DECTPU V3.1 1993-08-17. In other words, the language was finished by the early 1990s and has been maintained since then rather than extended.

Design Philosophy

DECTPU separates an engine from an interface. In the DECTPU guide’s words, it is “a language that you can use as a base on which to layer text processing applications. When you choose an editor or other application to layer on DECTPU, that becomes the interface between you and DECTPU.”

The design has three main consequences:

  1. An editor is a program. EVE has no privileged status. It is a large DECTPU program compiled into EVE$SECTION, which the system-wide logical name TPU$SECTION points to. Point that logical name at a different section file and EDIT/TPU becomes a different editor.
  2. Compile once, load fast. Source files (.TPU) compile into binary section files (.TPU$SECTION) that load at startup. From VAXTPU 1.2 onward, those files could be installed as shared images.
  3. The domain lives in the type system. Buffers, windows, markers, ranges, patterns, key-bound programs, learn sequences and subprocesses are all first-class data types. They are not library objects reached through handles.

Key Features

Data types

The DECTPU guide lists these types: ARRAY, BUFFER, INTEGER, KEYWORD, LEARN, MARKER, PATTERN, PROCESS, PROGRAM, RANGE, STRING, UNSPECIFIED, WIDGET and WINDOW. Typing is dynamic. In the manual’s words, “unlike many programming languages, DECTPU permits any variable to have any type of data as a value”. A variable takes its type from the right-hand side of an assignment, and built-in procedures check their arguments’ types when called.

There is no floating-point type. The manual points out that the DECwindows variant has no built-ins for floating-point numbers.

Statements and declarations

  • Assignment with :=
  • LOOP ... EXITIF ... ENDLOOP
  • IF ... THEN ... ELSE ... ENDIF
  • CASE ... ENDCASE
  • ON_ERROR ... ENDON_ERROR for error interception
  • PROCEDURE ... ENDPROCEDURE (procedures can return values and can be recursive)
  • MODULE ... ENDMODULE, CONSTANT, VARIABLE, LOCAL, EQUIVALENCE
  • ! begins a comment
  • GLOBAL, UNIVERSAL, BEGIN and END are reserved “for future expansion of the DECTPU language”

A simple procedure from DEC’s own guide:

! This procedure moves the editing
! position to the top of the buffer
PROCEDURE user_top
   POSITION (BEGINNING_OF (CURRENT_BUFFER));
   MESSAGE ("Now in buffer" + GET_INFO (CURRENT_BUFFER, "name"));
ENDPROCEDURE;

Patterns

Searching uses a pattern algebra built from strings, operators and built-ins. These include ANY, NOTANY, SPAN, SPANL, SCAN, SCANL, MATCH, ARB, and the anchor keywords LINE_BEGIN, LINE_END, BUFFER_BEGIN, BUFFER_END, PAGE_BREAK, REMAIN, ANCHOR and UNANCHOR. The operators are + (concatenation), & (linking), | (alternation) and @ (partial pattern assignment). The examples below are from the manual:

pat2 := "abc" + SPAN ("12345");   ! matches "abc123" in "xyzabc123def"
pat3 := "abc" | "xes";
pat5 := "xes" @ var1;             ! assigns the matched text to var1

Readers who know SNOBOL4 will recognise several of these names. DEC’s documentation does not say whether that was deliberate, so it is not claimed here as an influence.

Editor infrastructure as built-ins

The DECTPU guide lists the following features: multiple buffers, multiple windows, multiple subprocesses, keystroke and buffer-change journaling, batch text processing, insert or overstrike entry, free or bound cursor motion, learn sequences (recorded keystrokes, returned by LEARN_END as a value of type LEARN), pattern matching, key definition and a callable interface. CREATE_PROCESS and SEND let a buffer drive a subprocess such as MAIL, and CALL_USER calls out to a routine written in any language that follows the VMS calling standard.

Headless batch editing

DECTPU is also a scripting language for batch file transformation. With /NOSECTION/NODISPLAY, it runs a command file with no screen at all. The guide’s example is a global search-and-replace that can be submitted to a batch queue (abridged below):

$ EDIT/TPU/NOSECTION/COMMAND=gsr.tpu/NODISPLAY 'p1'
PROCEDURE global_search_replace (str_or_pat, str2)
LOCAL src_range, replacement_count;
ON_ERROR
   msg_text := FAO ('Completed !UL replacement!%S', replacement_count);
   MESSAGE (msg_text);
   RETURN;
ENDON_ERROR;
replacement_count := 0;
LOOP
   src_range := SEARCH (str_or_pat, FORWARD);
   ERASE (src_range);
   POSITION (END_OF (src_range));
   COPY_TEXT (str2);
   replacement_count := replacement_count + 1;
ENDLOOP;
ENDPROCEDURE;

input_file  := GET_INFO (COMMAND_LINE, "file_name");
main_buffer := CREATE_BUFFER ("main", input_file);
POSITION (BEGINNING_OF (main_buffer));
global_search_replace ("xyz$_", "user$_");
WRITE_FILE (main_buffer, "newfile.dat");
QUIT;

This loop ends on purpose with an error. When SEARCH finds no more matches, the ON_ERROR handler reports the count and returns, which is a common DECTPU idiom.

Customising EVE

Most users never wrote DECTPU code directly. Instead they used EVE initialization files containing EVE commands, which EVE translates into DECTPU calls. The guide’s example:

SET LEFT MARGIN 5
SET RIGHT MARGIN 60
OVERSTRIKE MODE
DEFINE KEY=gold/q QUIT
SET KEYPAD EDT

Users who wanted more could load a .TPU command file with /COMMAND, or compile their own procedures into a private section file.

Platforms

DEC’s and Compaq’s documentation describes DECTPU as running on VAX and Alpha hardware under (Open)VMS, with screen editing on VT100-, VT200-, VT300- and VT400-series and ANSI-compatible terminals, and on workstations through DECwindows. VSI’s OpenVMS User’s Manual, which covers x86-64 V9.2-2 or higher, IA-64 V8.4-1H1 or higher and Alpha V8.4-2L1 or higher, documents the DECTPU-based EVE as the default editor. VSI’s two DECTPU manuals list only Alpha V8.4-2L1 or higher on their title pages.

One sample program in the 1993 guide checks whether GET_INFO (SYSTEM, "operating_system") returns ULTRIX and, if so, saves its section file under a Unix path. Whatever DEC had in mind with that example, none of the manuals reviewed documents DECTPU as a supported product on ULTRIX, so no such claim is made here.

Current Relevance

DECTPU is a historical language in the sense that it has not changed meaningfully since the early 1990s. It is not dead software, though: it ships with every current OpenVMS release, VSI keeps its manuals in print, and anyone on OpenVMS who types EDIT is running a DECTPU program. Its practical footprint today is the remaining OpenVMS installed base, along with the personal EVE$INIT.EVE files and site-specific section files that those systems have built up over the years.

No open-source implementation of the language is known. There is no Docker image, because running DECTPU requires an OpenVMS system or an emulator running licensed OpenVMS.

Why It Matters

  • It treated editors as applications. By 1985 DEC had separated the editing engine from its user interface. That made it possible to ship two very different editors (EVE and the EDT emulator) on one runtime, build a language-sensitive programming editor (LSE) on the same base, and let a university programmer write a full vi clone without touching DEC’s code.
  • It made editing scriptable. The /NODISPLAY batch mode meant the same language that drove the screen could also run in a batch queue to edit files unattended.
  • It is an example of a domain-specific language with built-in types. Buffers, ranges, markers and patterns are part of the language rather than a library on top of a general-purpose one, which gives a domain-specific language a very different feel from an embedded scripting language.
  • It has lasted. A language introduced on VAX/VMS V4.2 still ships, with almost no changes, on OpenVMS for x86-64 four decades later.

Sources and Verification Notes

  • VAX/VMS Release Notes, Version 4.2 (AA-Z106A-TE, July 1985), section 1 and §4.6: introduction of VAXTPU, its EVE and EDT emulator interfaces, and the TPUSECINI.GBL section-file mechanism of the time.
  • VAX Language-Sensitive Editor VAX PASCAL Pocket Guide (AA-EV42A-TE, March 1985, LSE V1.0): earliest dated VAXTPU references.
  • VAX Text Processing Utility Manual (AA-EC64C-TE, April 1986, VAX/VMS 4.4): VAXTPU 1.2 changes.
  • VMS 5.0 (April 1988), 5.1 (December 1988), 5.3 (October 1989), 5.4 (August 1990) and 5.5 (November 1991) release notes, plus the bitsavers openvms-release-history.txt table.
  • Guide to the DEC Text Processing Utility, DEC Text Processing Utility Reference Manual and EVE Reference Manual (all April 1993, DECTPU V3.1), and the Compaq 2001 reissue (AA-PWCBD-TE). Code examples are taken from these manuals.
  • VSI DECTPU Reference Manual and User Guide (© 2026) and the VSI OpenVMS User’s Manual.
  • Hunter Goatley, “The Callable TPU Interface”, VAX Professional (the issue date is not given on the author’s reprint).
  • Gregg Wonderly, “v04i092: TPUVI for VMS part 1 of 17”, comp.sources.misc, 26 September 1988.

Not verified: the names of DECTPU’s designers; the exact release that first used the name “DECTPU” (only bracketed between November 1991 and April 1993); the exact VMS version in which plain EDIT switched its default from EDT to EVE; and any 1984 release or announcement.

Timeline

1985
The pocket guide for VAX Language-Sensitive Editor V1.0 (March 1985, for VAX/VMS V4.0 or later) already describes a CALL command that "allows you to call a specified VAXTPU procedure" and a GOLD-CTRL/Z "VAXTPU Command Mode". This is the earliest dated mention of the language found
1985
VAX/VMS V4.2 ships the VAX Text Processing Utility (VAXTPU) as part of the operating system. Its release notes, dated July 1985, call VAXTPU "a new high-performance, programmable, text processing tool" that "supports two DIGITAL-supplied editing interfaces, the EDT emulator and EVE". DEC's own release history records a 15 October 1985 submit date for V4.2
1986
VAXTPU Version 1.2 ships with VAX/VMS V4.4. It adds key maps and key-map lists, changes the default section-file type to TPU$SECTION and makes section files installable as shared images
1988
VMS V5.0 (release notes dated April 1988; DEC's release history gives a 16 May 1988 submit date) renames the default section file to TPU$SECTION.TPU$SECTION, and EVE Version 2.0 defines a supported programming interface: routines with the EVE$ prefix are public, and EVE$$ ones are private
1988
Gregg Wonderly of Oklahoma State University posts TPUVI, a vi editor written in TPU, to the comp.sources.misc newsgroup in 17 parts on 26 September 1988
1988
The VMS V5.1 release notes (December 1988) document a DECwindows version of VAXTPU Version 2.2 that can be invoked through its callable interface, for example from the MAIL utility
1993
The April 1993 manuals for DECTPU Version 3.1 use the name DEC Text Processing Utility for the first time in the documentation found. They support OpenVMS VAX and OpenVMS AXP, and DECwindows Motif. EVE becomes the Extensible Versatile Editor
2001
Compaq reissues the Guide to the DEC Text Processing Utility for OpenVMS 7.3, noting that its content "has not changed since OpenVMS Version 7.1"
2026
VMS Software, Inc. (VSI) publishes the DEC Text Processing Utility Reference Manual and User Guide with 2026 copyright dates. Its OpenVMS User's Manual, which covers x86-64 V9.2-2 or higher, still describes the DECTPU-based EVE as the default editor

Notable Uses & Legacy

EVE, the default OpenVMS editor

The Extensible Versatile Editor (originally the Extensible VAX Editor) is a DECTPU program. It is compiled into a section file, and EDIT/TPU loads that file by default. VSI's current OpenVMS User's Manual still names EVE as the editor that the plain EDIT command starts.

EDT Keypad Emulator

VMS V4.2 shipped a second TPU interface alongside EVE that copied the keypad of DEC's older EDT editor, so EDT users could move to TPU without relearning their keys. Later EVE releases added SET KEYPAD EDT and SET KEYPAD WPS commands to do the same job inside EVE.

VAX Language-Sensitive Editor (LSE)

DEC's language-aware programming editor for VAXset, later DECset, was built on VAXTPU from its first release. Its 1989 user manual says that all VAXTPU commands are available within LSE through the DO/TPU prefix, and LSE's report generator works by invoking VAXTPU.

VMS Mail and other callable-TPU clients

Through the TPU callable interface, other programs can embed the editor. The VMS Mail utility uses it to open EVE for composing messages, and Hunter Goatley wrote in VAX Professional about calling TPU from your own MACRO-32 code.

TPUVI (Oklahoma State University)

Gregg Wonderly wrote a vi emulation entirely in TPU and released it in 1988 through comp.sources.misc. It was later carried on the OpenVMS Freeware CD, which shows that the language was general enough to clone a completely different editor.

Running Today

Run examples using the official Docker image:

docker pull
Last updated: