DIGITAL Command Language

From Wikipedia, the free encyclopedia
Jump to: navigation, search
DIGITAL Command Language
Paradigm imperative
Designed by Digital Equipment Corporation
Developer Digital Equipment Corporation
OS RSX-11, OpenVMS
Windows PowerShell

DIGITAL Command Language (DCL) is the standard command language adopted by most of the operating systems (OSs) that were sold by the former Digital Equipment Corporation (which was acquired by Compaq, which was in turn acquired by Hewlett-Packard). It had its roots in the IAS, TOPS-20, and RT-11 OSs and was implemented as a standard across most of Digital's OSs, notably RSX-11, but took its most powerful form in the OpenVMS OS.

Written when the programming language Fortran was in heavy use, DCL is a scripting language supporting several datatypes, including strings, integers, bit arrays, arrays and booleans, but not floating point numbers. Access to OpenVMS system services (kernel API) is through lexical functions, which perform the same as their compiled language counterparts and allow scripts to get information on system state. DCL includes IF-THEN-ELSE, access to all the Record Management Services (RMS) file types including stream, indexed, and sequential, but unfortunately lacks a DO-WHILE or other looping construct, requiring users to make do with IF and GOTO-label statements instead.

Command line parser[edit]

For the OpenVMS implementation, the command line parser is a runtime library (CLI$) that can be compiled into user applications and therefore gives a consistent command line interface for both OS supplied commands and user written commands. The command line must start with a verb and is then followed by arguments or qualifiers (switches in Unix terminology) which begin with a '/' character. Unlike Unix (but similar to DOS), a space is not required before the '/'. Qualifiers can be position independent (occurring anywhere on the command line) or position dependent, in which case the qualifier affects the parameter it appears after. Most qualifiers are position independent. Only the first most significant part of the verb and qualifier name is required. An example OS command may look like:

    show device /files $1$DGA1424:

The second show command could also be typed as:

   sho dev $1$DGA1424:/fil







 foo :== $sys$sysexe:foo.exe





This is an example of using the TYPE verb
in the DCL language.

Indirect variable referencing[edit]


  $ i = 1
  $ variable'i' = "blue"
  $ i = 2 
  $ variable'i' = "green"
  $ j = 1
  $ color = variable'j'
  $ rainbow'color' = "red"
  $ color = variable'i'
  $ rainbow'color' = "yellow"


See also[edit]



External links[edit]