Difference between revisions of "CLI"

From VSI OpenVMS Wiki
Jump to: navigation, search
(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...")
 
Line 1: Line 1:
'''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).
+
'''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=
 
=Command Line Elements=
Line 20: Line 20:
  
 
=CLI Symbols=
 
=CLI Symbols=
[[Symbol|Symbols]] are stored in the CLI symbol table. The size of this table is defined in the system parameter [[CLISYMTBL]].
+
[[Symbol|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:
 +
 
 +
* $STATUS
 +
* $SEVERITY
 +
* $RESTART
 +
 
 +
In a batch process, CLI defines symbols [[P1]] through [[P8]] that allow access to the batch job parameters.
  
 
=Symbol Interpretation=
 
=Symbol Interpretation=
Line 49: Line 55:
 
This is a file.
 
This is a file.
 
  </nowiki>
 
  </nowiki>
 +
 +
=Process Permanent Files=
 +
 +
CLI initializes the following process permanent files and logical names for them:
 +
* [[SYS$INPUT]]
 +
* [[SYS$OUTPUT]]
 +
* [[SYS$ERROR]]
 +
* [[SYS$COMMAND]]
  
 
=Commands Executed Inside the CLI=
 
=Commands Executed Inside the CLI=

Revision as of 11:12, 18 July 2019

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:

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. In any process, CLI defines the following reserved symbols:

  • $STATUS
  • $SEVERITY
  • $RESTART

In a batch process, CLI defines symbols P1 through P8 that allow access to the batch job parameters.

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.
 

Process Permanent Files

CLI initializes the following process permanent files and logical names for them:

Commands Executed Inside the CLI

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

See also