CLI, or Command Line Interpreter, is a piece of software responsible for parsing user input on the command line and taking the required action (such as invoking images). Even though OpenVMS provides a possibility of using multiple CLIs, only DCL CLI is supplied with OpenVMS.
Command Line Elements
After interpreting logical names and symbols, every word or symbol entered by the user on the command line is identified as one of the following elements:
Command verb is the first and the only indispensable element on the command line.
Keywords accompany some command verbs with a very broad sense such as SET or SHOW and follow the command verb immediately delimited with a space.
The purpose of parameters is to provide objects for the command verb to perform operations on (such as symbols, logical names, files and other objects). Parameters can appear anywhere on the command line after the command verb and keywords delimited with a space. Parameters in a list are delimited with a comma but no spaces.
Qualifiers (similar to options in other OSs) serve to change the behavior of the command verb. They are delimited with slashes (/) and (optional) spaces. Sometimes the qualifier position matters:
- command qualifiers appear after the command verb or keywords and change the meaning of the entire command (PRINT/COPIES=3 FILE1,FILE2 prints three copies of both files)
- positional qualifiers change the meaning of the command line element they follow (e.g. if they appear after a certain parameter they change the meaning (PRINT FILE1/COPIES=3,FILE2 prints three copies of FILE1 but one copy of FILE2)
Symbols are stored in the CLI symbol table. The size of this table is defined in the system parameter CLISYMTBL. In any process, CLI defines the following reserved symbols:
In a batch process, CLI defines symbols P1 through P8 that allow access to the batch job parameters.
Certain elements on the command line follow this order of interpretation by CLI:
local symbol - global symbol - DCL Tables - DCL$PATH
Here they are:
- on the right side of an assignment statement (=)
- in an argument for a lexical function
- in a DEPOSIT, EXAMINE, or WRITE command
- at the beginning of a command line when the string is not followed by an equal sign (=) or a colon (:)
- in the brackets on the left side of an assignment statement when you are performing substring substitution or numeric overlays
In all other cases words appearing on the command line are treated as Command Line Elements: for example, any word appearing after TYPE that is not preceded by a slash to indicate that it is a qualifier is considered to be the parameter of a TYPE command, i.e. a file residing in the default directory (or a logical name that points to a file):
$ type my_symbol %TYPE-W-SEARCHFAIL, error searching for DKA0:[TEST]MY_SYMBOL.LIS; -RMS-E-FNF, file not found
To force symbol substitution on the command line, use single brackets:
$ type 'my_symbol' This is a file.
Process Permanent Files
CLI initializes the following process permanent files and logical names for them:
A prompt is a symbol that appears on the command line prompting the user to take action. The default prompt defined by DCL is "$". It can be changed with SET PROMPT; some commands that require user input (such as INQUIRE or READ SYS$COMMAND) allow you to set a different prompt for the duration of that command.
Commands Executed Inside the CLI
The following commands are executed inside the CLI, which means they do not invoke images:
- = (symbol assignment)
- SET CONTROL
- SET DEFAULT
- SET KEY
- SET ON
- SET OUTPUT_RATE
- SET PROMPT
- SET PROTECTION/DEFAULT
- SET SYMBOL/SCOPE
- SET UIC
- SET VERIFY
- SHOW DEFAULT
- SHOW KEY
- SHOW PROTECTION
- SHOW QUOTA
- SHOW STATUS
- SHOW SYMBOL
- SHOW TIME
- SHOW TRANSLATION