Table of Contents
VMS User Guide
Getting Around
# Show current directory (like PWD):
SHOW DEFAULT
# Change directory. [000000] is the root of the disk:
SET DEFAULT DKA0:[directory]
# Go up one directory level:
SET DEFAULT [-]
# Go back to your home directory:
SET DEFAULT SYS$LOGIN
# List directory contents:
DIR
With file sizes and dates:
DIR /SIZE /DATE
# Get help on any command:
HELP DIRECTORY
General help menu:
HELP
# See who else is logged in:
SHOW USERS
# Log out:
LOGOUT
File Management
# Create a directory
CREATE/DIRECTORY DUA0:[MYDIR]
Directory & subdirectory:
CREATE/DIRECTORY DUA0:[MYDIR.SUBDIR]
# View a file's contents:
TYPE filename.txt
Page through a long file:
TYPE /PAGE filename.txt
# Copy a file:
COPY oldfile.txt newfile.txt
# Rename/move a file:
RENAME oldname.txt newname.txt
# Delete a file:
DELETE filename.txt;1
Delete every version of it (VMS keeps old versions by default):
DELETE filename.txt;*
# Clean up old versions of your files:
PURGE
Keep only the 2 most recent versions of everything:
PURGE /KEEP=2 *.*
# Search inside a file for text:
SEARCH filename.txt "text to find"
# Print a file:
PRINT filename.txt
# Check your disk usage/quota:
SHOW QUOTA
Editors
# EDT (classic line/screen editor):
EDIT /EDT filename.txt
# EVE (friendlier full-screen editor, part of TPU):
EDIT /TPU filename.txt
or simply:
EDIT filename.txt
Mail & Messaging
# Read/send mail:
From inside MAIL, send a message:
SEND
Read your inbox:
READ
Exit mail:
EXIT
# Send a quick real-time message to another logged-in user:
PHONE username
or
REPLY "message text" username
DCL Basics
# Set a symbol (like a variable):
MYVAR = "hello"
SHOW SYMBOL MYVAR
# Write a simple command procedure (script):
CREATE MYPROC.COM
$ WRITE SYS$OUTPUT "Hello, VAX!" $ EXIT
Run it:
@MYPROC.COM
Programming
# Run Basic:
BASIC
CTRL-Z to exit
To save a program (from within the BASIC interpreter):
SAVE PROGRAM.BAS
To load a program (from within the BASIC interpreter):
OLD PROGRAM.BAS
# C programming
Fix a file copied in from a modern computer (line-ending issue):
$ SET FILE /ATTRIBUTES=(RFM:STMLF) filename
EDIT /EDT filename.c
CC FILENAME.C
LINK FILENAME
RUN FILENAME.EXE
Enter a simple hello world:
CREATE HELLO.C
#include <stdio.h>
int main() {
printf("Hello, VAX!\n");
return 0;
}
# Fortran
FORTRAN FORTRANFILE.FOR
Link and run same as C above.
# Pascal
PASCAL FILENAME.PAS
Link and run same as C above.
# Check for compile errors in the listing file:
TYPE FILENAME.LIS
Games
ADVENTURE
NETHACK
CHESS
STARTREK
HUNT
More to come….
