Chapter Contents |
Previous |
Next |
SAS Companion for the OpenVMS Operating Environment |
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:
qualifier=value |
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 - |
_$ parameter/qualifier |
When you end a command line with a hyphen, the next
prompt is preceded by an underscore (_).
Command Procedures |
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:
$ @RENAME
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 |
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:
$ DIR
Use the following DCL commands to manage your files:
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.