CLI

From VSI OpenVMS Wiki
Revision as of 10:49, 18 July 2019 by Darya.zelenina (talk | contribs) (Created page with "'''CLI''', or '''Command Line Interpreter''', is a part of the operating symbol responsible for parsing user input on the command line and taking the required action (such as...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CLI, or Command Line Interpreter, is a part of the operating symbol responsible for parsing user input on the command line and taking the required action (such as invoking images).

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:

Verb

Command verb is the first and the only indispensable element on the command line.

Keyword

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.

Parameter

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.

Qualifier

Qualifiers 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)

CLI Symbols

Symbols are stored in the CLI symbol table. The size of this table is defined in the system parameter CLISYMTBL.

Symbol Interpretation

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.
 

Commands Executed Inside the CLI

The following commands are executed inside the CLI, which means they do not invoke images:

See also