DIGITAL Command Language
   HOME

TheInfoList



OR:

DIGITAL Command Language (DCL) is the standard
command language A command language is a language for job control in computing. It is a domain-specific and interpreted language; common examples of a command language are shell or batch programming languages. These languages can be used directly at the comman ...
adopted by many of the
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s created by
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president un ...
. DCL had its roots in IAS,
TOPS-20 The TOPS-20 operating system by Digital Equipment Corporation (DEC) is a proprietary OS used on some of DEC's 36-bit mainframe computers. The Hardware Reference Manual was described as for "DECsystem-10/DECSYSTEM-20 Processor" (meaning the DEC PDP- ...
, and RT-11 and was implemented as a standard across most of Digital's operating systems, notably
RSX-11 RSX-11 is a discontinued family of multi-user real-time operating systems for PDP-11 computers created by Digital Equipment Corporation. In widespread use through the late 1970s and early 1980s, RSX-11 was influential in the development of later ...
and RSTS/E, but took its most powerful form in VAX/VMS (later
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
). DCL continues to be developed by VSI as part of OpenVMS. Written when the
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
Fortran was in heavy use, DCL is a
scripting language A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scripting ...
supporting several
datatype In computer science and computer programming, a data type (or simply type) is a set of possible values and a set of allowed operations on it. A data type tells the compiler or interpreter how the programmer intends to use the data. Most progra ...
s, including strings,
integers An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
, bit arrays, arrays and booleans, but not
floating point In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can ...
numbers. Access to
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
''system services'' ( kernel API) is through lexical functions, which perform the same as their
compiled language A compiled language is a programming language whose implementations are typically compilers (translators that generate machine code from source code), and not interpreters (step-by-step executors of source code, where no pre-runtime translation ...
counterparts and allow scripts to get information on system state. DCL includes
IF-THEN-ELSE In computer science, conditionals (that is, conditional statements, conditional expressions and conditional constructs,) are programming language commands for handling decisions. Specifically, conditionals perform different computations or actio ...
, access to all the Record Management Services (RMS) file types including stream, indexed, and sequential, but unfortunately lacks a DO-WHILE or other
looping Looping may refer to: Media and entertainment * Loop (music), a repeating section of sound material * Audio induction loop, an aid for the hard of hearing * a film production term for dubbing (filmmaking) * repeating drawings in an animated cartoo ...
construct, requiring users to make do with IF and
GOTO GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function c ...
-label statements instead. DCL is available for other operating systems as well, including * VCL and VX/DCL for Unix, * VCL for
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few o ...
,
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 r ...
and
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
, * PC-DCL an
Open DCL
for Windows/Linux * and Accelr8 DCL Lite for Windows. DCL is the basis of the XLNT language, implemented on Windows by an interpreter-IDE-WSH engine combination with CGI capabilities distributed by Advanced System Concepts Inc. from 1997.


Command line parser

For the OpenVMS implementation, the command line parser is a runtime
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
() 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 up to 8 parameters (arguments) and/or qualifiers (switches in
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
terminology) which begin with a '/' character. Unlike Unix (but similar to
DOS DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems. DOS may also refer to: Computing * Data over signalling (DoS), multiplexing data onto a signalling channel * Denial-of-service attack (DoS), an attack on a communicat ...
), 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. Qualifiers may also be assigned values or a series of values. Only the first most significant part of the verb and qualifier name is required. Parameters can be integers or alphanumeric text. An example OS command may look like: set audit /alarm /enable=(authorization, breakin=all) show device /files $1$DGA1424: The second ''show'' command could also be typed as: sho dev $1$DGA1424:/fil While DCL documentation usually shows all DCL commands in uppercase, DCL commands are case-insensitive and may be typed in upper-, lower-, or mixed-case. Some implementations such as OpenVMS used a minimum uniqueness scheme in allowing commands to be shortened while others such as RSX-11 allowed commands to be abbreviated to a minimum of three characters. Unlike other systems which use '' paths'' for locating commands, DCL requires commands to be defined explicitly, either via CLD (Command Language Definition) definitions or a ''foreign symbol''. Most
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
-native commands are defined via CLD files; these are compiled by the CDU, the Command Definition Utility, and added to a DCL 'table' -- by default, although processes are free to use their own tables—and can then be invoked by the user. For example, defining a command FOO that accepts the option "/BAR" and is implemented by the image could be done with a CLD file similar to: DEFINE VERB FOO IMAGE "SYS$SYSEXE:FOO.EXE" QUALIFIER BAR The user can then type "", or "", and the FOO program will be invoked. The command definition language supports many types of options, for example dates and file specifications, and allows a qualifier to change the image invoked—for example "", to create a file, vs. "" to create a directory. The other (simpler, but less flexible) method to define commands is via ''foreign commands''. This is more akin to the Unix method of invoking programs. By giving the command: foo :

$sys$sysexe:foo.exe
the command 'FOO' will invoke FOO.EXE, and supply any additional arguments literally to the program, for example, "". This method is generally used for programs ported from Unix and other non-native systems; for C programs using argc and argv command syntax. Versions of
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
DCL starting with V6.2 support the logical name for establishing Unix-style command paths. This mechanism is known as an Automatic Foreign Command. allows a list of directories to be specified, and these directories are then searched for DCL command procedures (''command''.COM) and then for executable images (''command''.EXE) with filenames that match the command that was input by the user. Like traditional foreign commands, automatic foreign commands also allow Unix-style command input.


Scripting

DCL scripts look much like any other scripting language, with some exceptions. All DCL verbs in a script are preceded with a $ symbol; other lines are considered to be input to the previous command. For example, to use the TYPE command to print a paragraph onto the screen, one might use a script similar to: $ TYPE SYS$INPUT: This is an example of using the TYPE verb in the DCL language. $ EXIT


Indirect variable referencing

It is possible to build arrays in DCL that are referenced through translated symbols. This allows the programmer to build arbitrarily sized data structures using the data itself as an indexing function. $ i = 1 $ variable'i' = "blue" $ i = 2 $ variable'i' = "green" $ j = 1 $ color = variable'j' $ rainbow'color' = "red" $ color = variable'i' $ rainbow'color' = "yellow" In this example the variable is assigned the value "red", and is assigned the value "yellow".


Commands

The following is a list of DCL commands for common computing tasks that are supported by the OpenVMS
command-line interface A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
. * COPY * COPY/FTP * CREATE * DELETE *
DIRECTORY Directory may refer to: * Directory (computing), or folder, a file system structure in which to store computer files * Directory (OpenVMS command) * Directory service, a software application for organizing information about a computer network' ...
* EDIT *
LOGOUT In computer security, logging in (or logging on, signing in, or signing on) is the process by which an individual gains access to a computer system by identifying and authenticating themselves. The user credentials are typically some form ...
* PRINT *
RENAME Rename may refer to: * Rename (computing), rename of a file on a computer * RENAME (command), command to rename a file in various operating systems * Rename (relational algebra), unary operation in relational algebra * Company renaming, rename ...
*
SET Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
* SHOW * TYPE


Lexical functions

Lexical functions provide string functions and access to VMS-maintained data. Some Lexicals are: * extract a substring * obtain date/time info, e.g. *: * for would return * searches for a file, returns a null ("") if not found * * it's a privilege to have access to this.


See also

*
Comparison of command shells A command shell is a command-line interface to interact with and manipulate a computer's operating system. General characteristics Interactive features Background execution Background execution allows a shell to run a command without u ...


References


Further reading

*


External links


VSI OpenVMS DCL Dictionary: A-MVSI OpenVMS DCL Dictionary: N-ZOpenVMS.org's DCL archive
{{Authority control Command shells OpenVMS OpenVMS software Scripting languages