HP OpenVMS Systems Documentation
OpenVMS User's Manual
1.3.3 DCL Command Line
DCL, like any language, has its own vocabulary and usage rules. The vocabulary consists of commands, parameters, and qualifiers, which are put together in a way that DCL can interpret. The way in which the parts of a command line are put together is referred to as the command line syntax.
A DCL command line uses the following format:
For a complete description of the components of a DCL command line, see Section 3.2.
Lexical functions are command language constructs that the DCL
interpreter evaluates and substitutes before it interprets a
command string. Chapter 17 discusses lexical
functions in more detail.
A file is a system object that contains information. This information can be machine-readable data that the computer understands. It can also be text that you enter and manipulate. The contents of a file might be the text of a document, a program, or a list of addresses. You can examine the contents of these files by displaying the files on an interactive display device or by printing them on paper.
Chapter 4 describes how to create and organize files to store information.
A directory is a special kind of file that contains the names and locations of files; files are listed in directories. For example, when the system manager creates a user account for you (see Section 1.1), a directory will also be created, often with the same name as your username. If your user name is JONES, the directory would be [JONES].
Chapter 5 describes how to use directories to organize and manage files.
Directory files are stored on disks. Disks are one
type of hardware device that the operating system uses
to store information.
Every file must have a file name and a file type to identify it to both the system and to you. The combination of the file name and the file type is sometimes referred to as a filename. A file also has a version number. You can have several versions of a file. Unless you specify a version number, the system uses the highest existing version number of a file. When you edit a file with a standard text editor, the system does not modify the original version, but creates a new output file. By default, the output file has the same name and file type as the original, but has a version number that is one higher than the existing file(s) of the same name.
The file name, file type, and version number form a file specification. A full file specification:
1.4.2 Directory Structures
Each disk contains a main directory, known as the master file directory (MFD). The MFD contains a list of user file directories (UFDs). UFDs are referred to as a user's top-level directories. Your top-level directory is usually your login or process default directory). Unless your account has been modified to do otherwise, the system automatically makes your top-level directory your process-default directory when you log in.
Refer to the Guide to OpenVMS File Applications for more information about how the system applies defaults to partial file specifications.
In most cases, a UFD exists for each user on the system. It contains
the names of and pointers to files cataloged in a user's directory.
Chapter 5 contains more information about directory structures.
A subdirectory is a directory file within another directory or subdirectory file. Subdirectories let you organize files into meaningful groups. For example, you might have one subdirectory that contains memos and another subdirectory for status reports.
Like a directory, a subdirectory contains names and pointers for the
files cataloged within it. A subdirectory can contain an entry for
another subdirectory, which can contain an entry for another
subdirectory, and so on. This structure (a top-level directory plus
subdirectories) is called a hierarchical directory
The device (disk) and directory components are often referred to as the
file path. The path, combined with the file name and
file type (and version) form a file specification. A
full file specification contains all of the information that the system
needs to locate and identify a file.
Beginning with OpenVMS Version 7.2 on Alpha only, a larger character
set is supported for directory and file names than was supported on
earlier versions. OpenVMS VAX does not support the larger character
set. Creating directories and files with such characters is supported
only on disks with ODS-5 (or greater) structure level.
On OpenVMS Alpha and OpenVMS VAX systems with ODS-5 and ODS-2 devices, you may use a basic set of simple characters for all the components of a file specification except the version. These characters include the following:
18.104.22.168 Extended Character Set
Beginning with OpenVMS Version 7.2 Alpha systems with ODS-5 disks support, filenames and directory names may consist of any 8-bit characters, excluding values 00 through 1F (hexadecimal) and the following characters:
Note that the character set includes both the ISO Latin-1 C1 character set (hexadecimal 80 - 9F) as well as the graphical and other characters between 9F and FF. This allows the entire ISO Latin-1 character set (with the exclusions noted above).
In addition, there is support for names that include any of the defined 16-bit Unicode characters (except for the character exclusions noted above).
Because many characters of the extended set cannot be entered on
commonly-available keyboards, they may be entered with a combination of
simple characters. Such a combination is known as a compound
character. Refer to the Guide to OpenVMS File
Applications for a description of these compound characters.
The following sections provide an overview of some basic OpenVMS
utilities described in this manual.
The OpenVMS Mail utility (MAIL) lets you send messages to and receive messages from other users on your system or on any computer connected to your system by DECnet software.
As a complement to MAIL, the MIME utility allows you to encode and decode MIME-encoded messages that you have received from other users or that you want to send to yourself.
The OpenVMS Phone utility (PHONE) lets you communicate with other users on your system or on any computer that is connected to your system by DECnet software.
Text editors allow you to create and modify text
files. With a text editor, you can enter text from a keyboard and
modify the text using text editing commands. For example, you can type
in data for a report and then rearrange sections, duplicate
information, substitute phrases, or format text. You can use text
editors to create and modify source files for programming languages
(such as DEC C for OpenVMS or VAX BASIC) or text formatters (such as
VAX DOCUMENT or DIGITAL Standard Runoff). The operating system supports
several text editors. Chapter 8 describes how to use EVE, and
Chapter 9 describes how to use EDT.
DIGITAL Standard Runoff (DSR) is a text formatter that processes source files into formatted text and intermediate files, and creates tables of contents and indexes. You use a text editor to create a source file, to which you should give the file type .RNO. This file contains text, DSR formatting commands, flags (special instruction characters you insert), and control characters.
The OpenVMS Sort/Merge (SORT/MERGE) utility can be invoked in two ways: by using the SORT command or by using the MERGE command. When you invoke the Sort/Merge utility with the DCL command SORT, it sorts records from one or more input files, according to the fields you select, and generates one reordered output file. You can use the Sort/Merge utility to reorder records in a file (or files) so that they are in alphabetic or numeric order and either ascending or descending order.
When you invoke the Sort/Merge utility with the DCL command MERGE, it combines up to 10 previously sorted files into one ordered output file.
The following sections provide an overview of devices you can use in an
Mass storage devices, such as disks and
magnetic tapes, save the contents of files on a
magnetic medium. Files saved this way can be accessed, updated,
modified, or reused at any time.
Record-oriented devices, such as terminals, printers,
mailboxes, and card readers read and
write only single physical units of data at a time and
do not provide online storage of the data. (Printers and card readers
are also called unit-record devices.)
The files you commonly access are stored on disks or magnetic tapes. Your user file directory (UFD) and your default directory with all your files and subdirectories are located on a disk. You can use a file specification that contains directory information only if the file is located on a disk. Magnetic tapes do not have directory structures. To obtain a file stored on tape, use a file specification that contains only file information.
Chapter 5 describes how to access files that are not on your default
device. Chapter 12 describes how to use private
volumes, which are tape and disk devices that are not
A logical name is a name equated to an equivalence string or to a list of equivalence strings. When you define a logical name, you equate one character string to an equivalence string, which is usually a full or partial file specification, another logical name, or any other character string. Once you equate a logical name to one or more equivalence strings, you can use the logical name to refer to those equivalence strings. For example, you might assign a logical name to your default disk and directory. Logical names serve two main functions: they increase readability and file independence.
You can define commonly used files, directories, and devices with
short, meaningful logical names. Such names are easier to remember and
type than the full file specifications. You can define names that you
use frequently in your login command procedure. A system manager can
define names that most users on your system use frequently in the
site-specific system startup command procedure.
You can use logical names to keep your programs and command procedures
independent of physical file specifications. For example, if a command
procedure references the logical name ACCOUNTS, you can equate ACCOUNTS
to any file on any disk before executing.
Symbols are names that represent numeric, character, or logical values. When you use a symbol in a DCL command line, DCL uses the value you assign to the symbol. By defining a symbol as a command line, you can execute the command by typing only the symbol name.
Entering DCL command lines that include parameters, multiple qualifiers, and values can make for much typing and can be time-consuming. To simplify your interaction with DCL and to save time, you can establish symbols to use in place of command names and entire command strings you type frequently.
You can also use symbols in command procedures to collect, store, and manipulate certain types of data.
A command procedure is a file that contains a series
of DCL commands. Some simple command procedures might contain only one
or two DCL commands; complex command procedures can function as
sophisticated computer programs. When a command procedure is executed,
the DCL interpreter reads the file and executes the commands it
If your system manager has set up a system login command
procedure, it is executed when you log in. A system login
command procedure lets your system manager ensure that certain commands
are always executed when you and other users on the system log in.
After executing the system login command procedure, the system executes your personal login command procedure, if one exists. Your personal login command procedure lets you customize your computing environment. The commands contained in it are executed every time you log in. When you log in, the system automatically executes up to two login command procedures (the systemwide login command procedure and your own login command procedure, if it exists).
The person who sets up your account might have placed a login command
procedure in your top-level directory. If a login command procedure is
not in your top-level directory, you can create one yourself, name it
LOGIN.COM and place it in your top-level directory. Unless your system
manager tells you otherwise, the LOGIN.COM file that you create will be
executed when you log in.
Lexical functions return information to a command line or command procedure. The information returned can be about your process, the system, files and devices, logical names, strings, or data types. Lexical functions are identified by the prefix F$.
You can use lexical functions in any context in which you normally use symbols or expressions. In command procedures, you can use lexical functions to translate logical names, to perform character string manipulations, and to determine the current processing mode of the procedure.
A process can be a detached process (a process that is independent of other processes) or a subprocess (a process that is dependent on another process for its existence and resources). Your main process, also called your parent process, is a detached process.
Chapter 18 describes how to use processes to perform computing tasks.
A program, also called an image or an
executable image, is a file that contains instructions
and data in machine-readable format. Some programs are associated with
and invoked by a DCL command. For example, when you type the DCL
command COPY, the system executes the program SYS$SYSTEM:COPY.EXE. Some
programs are invoked by entering the DCL command RUN followed by the
The system obtains the characteristics that are unique to your process
from the user authorization file (UAF). The UAF lists
those users permitted to access the system and defines the
characteristics for each user's process. The system manager usually
maintains the UAF. It is within your process that the system executes
your programs (also called images or executable images) one at a time.
Image files can be supplied by the operating system or by you and usually have the file type .EXE. You cannot examine an image file with the DCL commands TYPE, PRINT, or EDIT because image files do not consist of ASCII characters. (Text files contain ASCII characters, which are a standard method of representing the alphabet, punctuation marks, numerals, and other special symbols.)
Each system site has unique security requirements. For this reason, every site should have a system security policy that outlines physical and software security requirements for system managers and users. The OpenVMS Guide to System Security describes the security features available with the operating system and the tasks that system managers can perform to maintain account and system security.
To ensure system security, the OpenVMS operating system controls both access to the system and access to any object that contains shareable information. These objects, such as devices, volumes, logical name tables, files, and queues, are known as protected objects. All protected objects list a set of access requirements that specify who has a right to access the object in a given manner.
Chapter 19 describes general security issues such as controlling access to protected objects and accessing data on remote systems.