User Tools

Site Tools


vintage_systems:openvms

OpenVMS Survival Guide

This is an introduction to the OpenVMS operating system for new users with no previous experience of command line-based systems.

Users interact with the operating system through the command line, called DCL in OpenVMS. DCL prints a prompt character (“$”) on the terminal to indicate that it is ready for user input. The user types a command and presses the Enter key. (You have already done this when you entered the HELP command to get to this introduction.)

Usually, OpenVMS then processes the command, prints the results on the terminal, and DCL prints a new prompt to indicate it is ready for another command.

DCL accepts commands in upper-, lower-, or mixed-case. In this introduction commands will be shown in UPPERCASE for clarity.

Long commands can be abbreviated to their shortest unique prefix (usually 3-4 characters).

Identifying Files

OpenVMS stores information in files. A directory (called “folder” on some other systems) is a container for files and other directories. A device is a disk drive that stores directories and files.

Name, Type, Version

You can identify files in your default directory as follows:

file-name.file-type;version     

(For example: MY_FILE.TXT;1)

file-namecan be up to 39 characters long using A-Z, a-z, 0-9, _, -, ~, or $. (File names may not start with “-”.)
file-typeidentifies the type of data contained in the file. File types may also be up to 39 characters long (but are usually much shorter, about 3 characters long) using A-Z, a-z, 0-9, _, -, or $.
versionis a number incremented by OpenVMS whenever you change a file. This makes it easy to recover the previous version of a file if you make an error while editing. Specifying the version is optional, and if omitted, OpenVMS will select the highest (most recently modified) version number.

Device, Directory, Logical Name

Files outside your default directory can be identified as follows:

device:[directory]file-name.file-type;version     

(For example: $4$DKA0:[USER.PAPA.SHARE.DOC]VMSMAGIC.TXT)

deviceis the disk drive where the file is stored.
directoryis the directory that contains the file. Multiple directory levels are separated with “.”.

Logical names can be used as a shortcut to a device and directory:

logical:file-name.file-type;version     

(For example: USER:LOGIN.COM)

Wildcards

Wildcard characters * and % can be used to identify multiple files with names matching a pattern.

*matches any any string of characters, or zero characters. For example, *.TXT will match any file with file type “TXT”.
%matches any single character. For example, %%.TXT will match any file type “TXT” file with a file name exactly two characters long.

Basic Commands

The most important DCL commands are:

DIRECTORYList file names.
TYPEDisplay file contents.
EDITCreate or modify a file.
COPYCopy files.
RENAMERename files.
DELETEDelete files and directories.
PURGEDelete old versions of files.
CREATE/DIRECTORYCreate a directory.
SET DEFAULTChange your default directory.

Editing Files

To edit a file, enter the following command at the DCL prompt:

EDIT file                          (Do not user wildcards in file.)

The editor will respond with its command prompt character “*”.

Enter the editor command CHANGE to change to keypad mode. The editor will display the first screen of your file. You can now edit the file, move the cursor with the arrow keys, delete characters with Backspace, and display different screens with PgDn and PgUp.

Leave keypad mode by pressing Ctrl/Z.

Enter the command EXIT to save your file and return to DCL. Use the command QUIT to leave the editor without saving changes.

Getting Help

OpenVMS has an extensive on-line help system. Entering the DCL command HELP prints an overview of the help system followed by a list of available topics.

If help output is longer than a single screen, output will be paused after each screen and the message “Press RETURN to continue …” will be displayed. Press Enter to display the next screen.

At the “Topic?” or “… Subtopic?” prompt, enter the name of the topic you wish to view. Topic names may be abbreviated to a unique prefix. Press “?” to redisplay the list of available topics.

Leave the help system and return to DCL by pressing Ctrl/Z at any prompt.

You can directly display a particular help topic by entering the following DCL command:

HELP topic subtopic ...

Further Reading

  • Giorgio P. Ingargiola, Kenneth B. Sall, John Fowler. VMS Mini-Primer. Accessed 22-OCT-2024.
  • Bob DuCharme. "Part 3: OpenVMS", in Fake Your Way Through Minis and Mainframes. Accessed 22-OCT-2024.
vintage_systems/openvms.txt · Last modified: 2024/10/22 05:05 by papa