DCL (DIGITAL Command Language) is the shell and scripting language for VAX/VMS (later OpenVMS), created by Digital Equipment Corporation in 1977. It is a shell designed for a minicomputer operating system that valued correctness, explicitness, and the kind of thoroughness that makes every operation take four times as long to type as the Unix equivalent.
riclib worked on VAX/VMS. riclib remembers. The memory is not fond.
“I remember working in VAX VMS. That was a horrible shell.”
— riclib, summarizing the entire DCL experience in one sentence
The Syntax
DCL commands are English words with slash-delimited qualifiers. Where Unix uses single-character flags (ls -la), DCL uses full words with slashes (DIRECTORY/SIZE/DATE/PROTECTION). Where Unix is terse, DCL is comprehensive. Where Unix trusts you to know what -l means, DCL spells it out. This sounds like good design. In practice, it means typing a novel to list a directory.
$ DIRECTORY/SIZE/DATE/PROTECTION [.SUBDIR...]*.TXT;*
This is the DCL equivalent of ls -laR subdir/*.txt. Let us count:
DIRECTORY— the command (9 characters, where Unix useslsfor 2)/SIZE— show file sizes (5 characters, where-sis 2)/DATE— show dates (5 characters, where-lincludes dates already)/PROTECTION— show permissions (11 characters, where-lincludes permissions already)[.SUBDIR...]— recursive subdirectory (VMS syntax: brackets for directories, dots for relative paths, ellipsis for recursion)*.TXT;*— wildcard for .TXT files, all versions (the semicolon and asterisk specify “all version numbers”)
Fifty-two characters. The Unix command is twenty characters. The information returned is the same.
The Version Numbers
VMS had automatic file versioning. Every time you saved a file, VMS created a new version. REPORT.TXT;1 was the first version. REPORT.TXT;2 was the second. REPORT.TXT;47 was the forty-seventh. You could access any version at any time. You never lost work. The filesystem was its own version control.
This was genuinely clever. This was, in fact, a feature that modern systems have spent decades reimagining through Git, Time Machine, and filesystem snapshots. VMS had it in 1977. On the filesystem. Automatically.
The downside was that every file wildcard needed a version specifier. *.TXT was the latest version of all text files. *.TXT;* was all versions of all text files. *.TXT;-1 was the previous version. Forget the version specifier and you got the latest version, which was usually correct, but the syntax was a constant reminder that every file was actually every version of every file and the filesystem was deeper than it appeared.
The Batch System
VMS had a batch job system controlled through DCL. Submitting a batch job was:
$ SUBMIT/QUEUE=SYS$BATCH/NOTIFY/LOG_FILE=SYS$LOGIN:JOB.LOG MYJOB.COM
Where Unix would use nohup ./myjob.sh > job.log &.
The VMS command is explicit. The VMS command specifies the queue, the notification preference, and the log file location. The VMS command is also fifty-eight characters long for something that Unix does in twenty-eight characters plus a redirect.
The Horror
The horror of DCL was not any single feature. Each feature — the verbose syntax, the version numbers, the batch system, the qualifiers — was individually defensible. The horror was the cumulative weight: every operation required more typing, more syntax, more qualifiers, more slashes than the equivalent Unix operation.
Working in DCL after knowing Unix was like writing an essay in formal legal language after knowing conversational English. Everything you wanted to say could be said. Everything you said was precise. And the effort of saying it was exhausting.
“DCL taught me to appreciate every other shell I would ever use. After DCL, Bash felt like poetry. After DCL, sh felt like haiku. After DCL, even cmd felt acceptable. DCL was the shell that made all other shells better by existing as the baseline of what a shell should not be.”
— riclib, on the pedagogical value of suffering
The Redeeming Features
In fairness — and encyclopedias must be fair, even to their subjects:
- VMS was a genuinely reliable operating system. It ran banking systems, industrial control, telecommunications. It had uptimes measured in years.
- The file versioning was ahead of its time by decades.
- DCL’s verbosity meant that scripts were self-documenting — you could read a DCL script and understand it without comments, because the commands said exactly what they did.
- The security model was comprehensive and correct.
VMS was a good operating system. DCL was a horrible way to interact with it. These two things are not contradictory. A mansion can have a terrible front door.
Measured Characteristics
Year created: 1977
Creator: Digital Equipment Corporation
Platform: VAX/VMS, later OpenVMS
Command for listing files: DIRECTORY (9 characters)
Unix equivalent: ls (2 characters)
Ratio: 4.5:1 (and that's just the command name)
Qualifier syntax: /QUALIFIER (slashes, full words)
Unix flag syntax: -f (dashes, single characters)
File versioning: automatic (every save creates a new version)
Years before Git reinvented versioning: 28 (VMS had it in 1977, Git arrived in 2005)
riclib's assessment: horrible
What DCL taught riclib: to appreciate every other shell
VMS reliability: excellent (years of uptime)
DCL usability: the opposite of excellent
The mansion metaphor: good OS, terrible front door
See Also
- sh — The Unix shell that existed at the same time as DCL and was better in every way that involved typing. sh and DCL were born two years apart. They aged differently.
- cmd — The Windows shell that is also horrible but in different ways. cmd is terse and limited. DCL is verbose and comprehensive. Both are unpleasant.
- Bash — The shell that, after DCL, felt like poetry. This is the highest compliment riclib has ever paid Bash.
- VT100 — The terminal that connected to VAX/VMS systems. The terminal was elegant. The shell was not.
