|SAS Companion for the OpenVMS Operating Environment|
When you communicate with the OpenVMS operating environment, you can use the OpenVMS Digital Command Language (DCL). Like other languages, DCL has grammar rules and a vocabulary. The vocabulary is a set of commands, and the grammar rules determine how you specify the commands.
|The Command Line|
A completely specified DCL command is called a command line. The general form of a command line is
|$ command/qualifier parameter/qualifier|
The dollar sign ($) prompt is required in all DCL command lines. When you execute DCL commands interactively, the OpenVMS system supplies the system prompt, which by default is the $ prompt. When you enter DCL commands in a command file, such as LOGIN.COM, you must enter the $ prompt in column 1.
The command is a DCL command that identifies the action to be performed. Use OpenVMS DCL Dictionary as a general reference to DCL commands and rules of grammar. Some commonly used DCL commands are described in Commonly Used DCL Commands.
Some DCL commands are called verbs. These are commands whose names indicate the command's function.
The qualifier is an optional keyword that modifies or expands the action of the command. It is always preceded by a forward slash (/). If a qualifier requires a value, it is given in the following form:
A parameter is either a keyword or a file specification (depending on the command) that is acted on by the command. For details about how to enter an OpenVMS file specification, see OpenVMS Filenames.
If the command requires one or more parameters, then OpenVMS prompts you for them, unless you include the parameter in the command line. Notice in the command line syntax that both commands and parameters can be qualified.
If a command line does not fit on one line, enter a space and a hyphen (-) as the last element in the command line. Then press the RETURN key and continue the command on the next line. Here is an example:
|$ command -|
When you end a command line with a hyphen, the next
prompt is preceded by an underscore (_).
You can interrupt command-line processing by simultaneously pressing the CTRL key and the Y key (CTRL-Y).
A command procedure is an OpenVMS file that contains sequences of DCL commands. The OpenVMS file type for command procedures is .COM. The LOGIN.COM file is an example of a command procedure. (For more information, see LOGIN.COM File.) To save yourself time when you perform complicated or repetitive tasks, you can create command procedures.
Use your favorite editor to create the file of commands. For example, the following series of commands might be included in a command procedure named RENAME.COM:
$ PURGE *.* $ RENAME *.*; *.*;1
The first line deletes all but the latest version of all files in your default directory. The second line renames all files in your current directory to version 1.
To invoke the RENAME.COM command procedure, you would enter the following command at the $, or system, prompt:
The at sign (@) indicates that you want to execute a command procedure. For more information about creating and using command procedures, refer to OpenVMS User's Manual.
|Commonly Used DCL Commands|
Some of the most commonly used commands in an interactive command language are those that control your terminal session and those that manage files. The following subset of commands is divided into these two categories: controlling a terminal session and managing files. Many of these commands are used in examples throughout this document. The common abbreviation for a command is shown in parentheses beside the fully specified command. These abbreviations are the defaults; if these commands or symbols have been redefined, they may have a different action. See your system manager if the abbreviation does not work as you expected.
Note: You can issue any DCL command from within a SAS
program by specifying the command in the SAS X statement or X command. For
more information, see Issuing DCL Commands during a SAS Session.
Use the following DCL commands to control your terminal session:
Use the following DCL commands to manage your files:
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.