HP OpenVMS Systems Documentation

Content starts here

OpenVMS User's Manual

Previous Contents Index

1.12 Logging Out of the System

When you finish using the system, always log out. This prevents unauthorized users from accessing your account and the system. It is also a wise use of system resources; the resources you no longer need are available for other users.

To log out, enter LOGOUT at the DCL prompt. For example:


The system displays a message, similar to the following message, confirming that you are logged out of the system:

HARRIS logged out at 11-DEC-2002  12:42:48.12

You can log out of the system only when you are at the DCL prompt ($). You cannot enter the LOGOUT command while you are compiling or executing a program, using a text editor (such as EDT or EVE), or running a utility (such as Mail). First you must exit the program, editor, or utility. When the system displays the DCL prompt, you can log out.

1.12.1 Obtaining Accounting Information

To find out how much time you spent at the terminal (elapsed time), how much computer time you used (charged CPU time), and other accounting information, enter LOGOUT/FULL at the DCL prompt. For example:


The system displays information similar to the following:

SIMPSON logged out at 11-DEC-2002  12:42:48.12

Accounting information:
 Buffered I/O count:      8005   Peak working set size:    212
 Direct I/O count:         504   Peak virtual size:        770
 Page faults:             1476   Mounted volumes:            0
 Charged CPU time:0 00:00:50.01  Elapsed time:0 02:27:43.06

1.12.2 Ending a Remote Session

You can end a remote session in two ways:

  • Use the remote system's logout procedure (for example, on an OpenVMS system, use the LOGOUT command).
  • Press Ctrl/Y twice to obtain the host system's prompt, which asks whether you want to abort the remote session. Answer YES (Y) if you want to abort the remote session. This method works regardless of the type of system running on the remote node.

When you end a remote session, the system displays the message "%REM-S-END, control Entered to node NODENAME::" and Enters you to the process on the system from which you made the remote node connection.

1.12.3 Lost Network Connections

If a TCP/IP network connection to a remote system is lost, TCP/IP uses the best-effort delivery protocol, which is a characteristic of network technologies that attempts to deliver data but does not try to recover if there is an error such as a line failure.

If a DECnet network connection to a remote system is lost, DECnet will retransmit your data in an attempt to reestablish communications. If DECnet is unable to reestablish communications within a predetermined timeout period, your connection to the remote system is terminated and the system displays the message "Path lost to partner."

1.13 Logging Out Without Compromising System Security

Logging out of a session conserves system resources and protects your files. Leaving a terminal on line represents one of the greatest sources of inside break-ins. When you leave your terminal on line and your office open, you have effectively given away your password and your privileges and have left your files and those of the other members of your group unprotected. Any user can easily and quickly transfer all files accessible through your account. A malicious insider could rename and delete your files and any other files to which you have write access. If you have special privileges, especially privileges in the Files or All category, a malicious user can do major damage.

If you are working on a system that doesn't automatically lock after a determined time of inactivity, you should log out when you leave your office even for a brief period of time. If you have performed remote logins, you must log out of each node.

Your security administrator might ask you to break the connection to a dialup line when you log out. Breaking the connection to a dialup line:

  • Prevents others from taking advantage of an open access line. To access the line, someone must know the access number and must personally redial.
  • Is especially important if the dialup line you use is in a public area or where someone might use the terminal after you.
  • Saves resources by reducing the required number of dialup lines.

1.14 Networks

When computer systems are linked together, they form a network. Operating systems in an OpenVMS network are able to communicate with each other and share information and resources. Each system in a network is called a network node or host and is identified by a unique name or address. Host and node are used interchangeably, and mean a system connected to a network.

With OpenVMS, you have a choice of networking protocols. You can use the Compaq TCP/IP Services for OpenVMS product or Compaq's DECnet products within a single network, or you can have an environment where both products exist. Compaq's primary network strategy for OpenVMS is TCP/IP, the industry-standard network protocol suite.

1.14.1 Network Nodes

When you are logged in to a network node, you can communicate with other nodes in the network. The node at which you are logged in is called the local node; other nodes on the network are called remote nodes. If you have access to an account on a remote node, you can log in to that account from your local node and perform tasks on that node while remaining connected to your local node.

Section 1.5.2 describes how to log in to a remote node. Additional tasks you can perform on remote nodes are described in the appropriate chapters of this manual.

1.14.2 Executing Programs over Networks

Because of support provided by TCP/IP and DECnet software, programs can execute across the network as if they were executing locally. Because the network software is integrated within the operating system, it is easy to write programs that access remote files. To access a remote file in an application program, you need only include the name of the remote node and any required access control information in the file specification.

Task-to-task communications, a feature common to all TCP/IP or DECnet implementations, allows two application programs running on the same or different operating systems to communicate with each other regardless of the programming languages used. Examples of network applications are distributed processing applications, transaction processing applications, and applications providing connection to servers.


In the examples of remote operations in this manual, proxy accounts enable users to perform operations on remote systems. Proxy accounts are one way users can access remote systems. For additional ways to access remote systems, see the OpenVMS System Manager's Manual.

Chapter 2
Using DCL to Interact with the System

The DIGITAL Command Language (DCL) is a set of English-like instructions that tell the operating system to perform specific operations. DCL provides you with over 200 commands and functions to use in communicating with the operating system to accomplish computing tasks. DCL commands let you do the following:

  • Get information about the system
  • Work with files
  • Work with disks, magnetic tapes, and other devices
  • Modify your work environment
  • Develop and execute programs
  • Provide security and ensure that resources are used efficiently

The following table lists the DCL commands you use to perform a few common computing tasks:

Command Task
COPY Makes a copy of a specified file
COPY/FTP Transfers files between hosts over a TCP/IP network
CREATE Creates files or directories
DELETE Erases a specified file and removes it from a directory
DIRECTORY Displays the contents of a directory (list of files)
EDIT Views and changes the contents of a text file
LOGOUT Ends your session
PRINT Sends a specified file to a printer for printing
RENAME Changes the name or the location of a specified file
SET Controls how you see the system on the screen
SHOW Displays the status of the system
TYPE Displays the contents of a specified file on the screen

In this chapter you will learn how to use the DIGITAL Command Language. This chapter includes information about:

  • Entering DCL commands
  • The DCL command line
  • Rules for entering DCL commands
  • Entering parameters
  • Entering qualifiers
  • Entering dates and times as values
  • Recalling commands
  • Editing the DCL command line
  • Defining terminal keys
  • Key sequences

Differences in Your Local Environment

Note that this manual covers standard DCL commands only. System managers at your site may customize your system to support the local environment. They might decide to:

  • Use a different command language interpreter
  • Change the default action of some standard DCL commands
  • Disable some DCL commands
  • Alter some system defaults, such as the DCL prompt
  • Configure an environment with extended file specifications

For additional information on the commands, qualifiers, and parameters discussed in this chapter, refer to the OpenVMS DCL Dictionary and online help.

2.1 Entering Commands

To enter a DCL command, type the command at the DCL prompt ($) and press Enter. DCL is not usually case sensitive; you can enter commands in either uppercase or lowercase letters.1

In the following example, the DCL command SHOW TIME is entered as follows:


The system responds by displaying the current date and time and returns the DCL prompt to indicate it is ready to accept another command:

11-DEC-2002  15:41:43

2.1.1 Usage Modes

You can use DCL in the following two modes:

  • Interactive
    In interactive mode, you enter commands from your terminal. One command has to finish executing before you can enter another.
  • Batch
    In batch mode, the system creates another process to execute commands on your behalf. A batch job is a command procedure or program that is submitted to the operating system for execution as a separate user process. After you submit the command procedure for batch execution, you can continue to use your terminal interactively.
    Batch jobs and network processes use DCL in batch mode. See Chapter 16 for more information about processes.

2.1.2 Types of DCL Commands

When you enter a DCL command, it is read and translated by the DCL interpreter. The way the command interpreter responds to a command is determined by the type of command entered. The three types of DCL commands are as follows:

  • Built-in commands
    These commands are built in to the DCL interpreter and are executed internally.
  • Commands that invoke programs
    DCL calls another program to execute the command rather than executing it internally. The program invoked to execute a command is referred to as a command image. This command image can be either an interactive program, a utility (such as Mail), or a noninteractive program (such as COPY).
  • Foreign commands
    A symbol that executes an image is referred to as a foreign command. A foreign command executes an image whose name is not recognized by the command interpreter as a DCL command. Refer to Chapter 12 for complete information on symbols.


1 For information on case sensitivity, see Chapter 5.

2.2 The DCL Command Line

DCL, like any language, has its own vocabulary and usage rules. DCL is made up of words (vocabulary) and word order (syntax or format). The following sections describe these two elements and explain how to construct a valid DCL command.

The following example shows the general format and parts of a DCL command line:

(1)   (2)   (3)      (4)     (5)     (6)

The following list describes each element of the DCL command line:

  1. DCL prompt
    The dollar sign ($) is the default DCL prompt. When you work interactively with DCL, DCL displays the prompt when it is ready to accept a command.
  2. DCL command
    A DCL command specifies the name of the command. The command can be a built-in command, a command that invokes a program, or a foreign command. In this example, the DCL command is PRINT.
  3. Qualifier
    A qualifier modifies the action taken by the command. Some qualifiers modify the entire command, while others can modify specific command parameters. Some qualifiers can accept values. Qualifiers are always preceded by a slash (/). In this example, the qualifier is /COPIES.
  4. Value
    A value modifies a qualifier and is often preceded by an equal sign (=). A value can be a file specification, a character string, a number, or a DCL keyword. A keyword is a word reserved for use in certain specified formats.
    In this example, the value is 5 (for 5 copies).
  5. Parameter
    A parameter specifies what the command acts upon. You must position parameters in a specified order within the command. Examples of parameter values include file specifications, queue names, and logical names.
  6. Enter key
    The Enter key ends the DCL command line and signals to the system that the command is ready for processing.

The following items may also be used in a DCL command line:

  • Labels
    Labels identify lines in command procedures. Use labels only within command procedures, which are described in Chapter 13 and Chapter 14.
  • Keywords
    Keywords are words that are defined for use in certain specified formats. You must use keywords exactly as listed in the description of the particular DCL command you want to specify. For example, system, owner, group, and world are DCL keywords for the /PROTECTION qualifier of the SET SECURITY command. (A DCL keyword can also have a value.)
  • Wildcard characters
    Wildcard characters are the asterisk (*), percent sign (%), ellipsis (...) and hyphen (-). They can be used within, or in place of, a file name, file type directory name, or version number in a file specification to indicate all for the given field. For information about using wildcard characters with files and directories, see Chapter 3, Chapter 4, and Chapter 5.

2.2.1 Syntax

Just as a spoken language depends on the order of words to create meaning, DCL requires that you put the correct elements of the command line in a specific word order or format.

Following are two examples of the syntax, or format, used for typical DCL commands:


command parameter/qualifier

When you enter a DCL command, some parameters are required; they must be entered on the command line. If you do not enter them, the system prompts you to supply the missing information. A line beginning with an underscore (_) means that the system is waiting for your response.

When you are prompted for an optional parameter, press Enter to omit it. At any prompt, after you enter the required parameter, you can enter one or more of the remaining parameters and any additional qualifiers.

Note that you must enclose in quotation marks ("") any parameter containing a slash (/) or at sign (@).

In the following example, the TYPE command requires a file specification. Because a file specification is a required parameter of the TYPE command, if you do not enter one, the system requests it.

_File:   WATER.TXT

2.2.2 Canceling Commands

If you press Ctrl/Z after a command prompt, DCL ignores the command and redisplays the DCL prompt.

2.2.3 Using Defaults

Some items, called defaults, need not be specified on the command line. When DCL performs an operation by default, it assigns a command certain values or performs certain functions associated with that command even though you may not have explicitly specified those values or functions when you entered the command. In general, the values and functions are those considered typical or expected by users.

DCL supplies default values in several areas, including command parameters and qualifiers. For parameter defaults, see the sections in this manual that describe the specific DCL command. Qualifier defaults are described in Section 2.5.

If the number of copies is not specified as a qualifier for the PRINT command, DCL uses the default value 1. In the following example, the default is overridden and multiple copies of the file are printed by including the /COPIES qualifier on the PRINT command line:


2.2.4 Entering Multiple Line Commands

If you enter a command longer than one line, you can continue the command onto the next line by following this procedure:

Step Task
1 End the command line with a hyphen (-) and press Enter.

The system displays an underscore (_) followed by the DCL prompt ($).

2 Enter the rest of the command line after this prompt.

A line beginning with an underscore means that the system is waiting for your response.

Note the following:

  • You must include the appropriate spaces between command names, parameters, and so on.
  • Pressing Enter after the hyphen does not add a space.
  • There is no restriction to the number of continued lines you can use to enter a command, as long as you do not exceed the 1024-character limit.
  • You can also enter a long command line without specifying a hyphen; the system automatically wraps text to the next line. However, separating portions of the command lines with hyphens makes the command line easier to read.

The following example shows how to enter a multiple line command:


You can use the DCL command PIPE to create complex command processing statements from a single DCL command. For example, you can execute one or more of the following operations from the same DCL command line:

  • Pipelining (a sequence of commands)
  • Input/output redirection
  • Multiple and conditional command execution
  • Background processing

For more detailed information, see Section 14.20 and the description of the PIPE command in the OpenVMS DCL Dictionary: N--Z.

2.3 Rules for Entering DCL Commands

The following rules apply when entering DCL commands. Refer to Chapter 5 for information about using extended file names in DCL commands.

  • Use any combination of uppercase and lowercase letters. The DCL interpreter translates lowercase letters to uppercase. Uppercase and lowercase characters in parameter and qualifier values are equivalent unless enclosed in quotation marks (" ").
  • Separate the command name from the first parameter with at least one blank space or a tab.
  • Separate each additional parameter from the previous parameter or qualifier with at least one blank space or a tab.
  • Begin each qualifier with a slash (/). The slash serves as a separator and need not be preceded by blank spaces or tabs.
  • If a parameter or qualifier value includes a blank space or a tab, enclose the parameter or qualifier value in quotation marks.
  • You cannot specify null characters (<NUL>) on a DCL command line, even if you enclose the null character in quotation marks.
  • Include no more than 127 elements (parameters, qualifiers, and qualifier values) in each command line.
    Each element in a command must not exceed 255 characters. The entire command must not exceed 1024 characters after all symbols1 and lexical functions2 are converted to their values.
  • You can abbreviate a command as long as the abbreviated name remains unique among the defined commands on a system. DCL looks only at the first four characters for uniqueness.
    The following commands are equal:


    For greater clarity and to ensure that your command procedures are upwardly compatible, do not abbreviate commands in command procedures. See Chapter 13 and Chapter 14 for more information about using commands in command procedures.


1 You use symbols, described in Chapter 12, to pass information to the system in an abbreviated manner.
2 A lexical function, described in Chapter 15, obtains information from the system.

Previous Next Contents Index