Difference between revisions of "CLI"
m |
|||
Line 36: | Line 36: | ||
* on the right side of an assignment statement (=) | * on the right side of an assignment statement (=) | ||
− | * in an argument for a [[Lexical Function|lexical function]] | + | * in an argument for a [[Lexical Function|lexical function]] |
* in a [[DEPOSIT]], [[EXAMINE]], or [[WRITE]] command | * 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 (:) | * at the beginning of a command line when the string is not followed by an equal sign (=) or a colon (:) |
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.
Contents
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:
- = (symbol assignment)
- ALLOCATE
- ASSIGN
- ATTACH
- CALL
- CANCEL
- CLOSE
- CONNECT
- CONTINUE
- CREATE/LOGICAL_NAME_TABLE
- DEALLOCATE
- DEASSIGN
- DEBUG
- DECK
- DEFINE
- DEFINE/KEY
- DELETE/SYMBOL
- DISCONNECT
- ELSE
- ENDIF
- ENDSUBROUTINE
- EOD
- EXAMINE
- EXIT
- GOSUB
- GOTO
- IF
- INQUIRE
- ON
- OPEN
- READ
- RECALL
- RETURN
- 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
- SPAWN
- STOP
- SUBROUTINE
- THEN
- WAIT
- WRITE