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).
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.
You can identify files in your default directory as follows:
file-name.file-type;version
(For example: MY_FILE.TXT;1
)
file-name | can be up to 39 characters long using A-Z, a-z, 0-9, _, -, ~, or $. (File names may not start with “-”.) |
file-type | identifies 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 $. |
version | is 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. |
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
)
device | is the disk drive where the file is stored. |
directory | is 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
)
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. |
The most important DCL commands are:
DIRECTORY | List file names. |
TYPE | Display file contents. |
EDIT | Create or modify a file. |
COPY | Copy files. |
RENAME | Rename files. |
DELETE | Delete files and directories. |
PURGE | Delete old versions of files. |
CREATE/DIRECTORY | Create a directory. |
SET DEFAULT | Change your default directory. |
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.
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 ...