ArticleslgStudy

computer science

DIGITAL Command Language

DIGITAL Command Language is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DIGITAL Command Language rather than just read about it. In short: DIGITAL Command Language (DCL) is the standard command language for many of the operating systems created by Digital Equipment Corporation. DCL was originally implemented for IAS as the Program Development System (PDS), and later added to RSX-11M, RT-11 and RSTS/E, but took its most powerful form in VAX/VMS (later OpenVMS).

DIGITAL Command Language — main illustration
DIGITAL Command Language — illustration

Key takeaways

  • DIGITAL Command Language belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DIGITAL Command Language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DIGITAL Command Language from memory before moving on to harder problems.

Reference excerpt

DIGITAL Command Language (DCL) is the standard command language for many of the operating systems created by Digital Equipment Corporation. DCL was originally implemented for IAS as the Program Development System (PDS), and later added to RSX-11M, RT-11 and RSTS/E, but took its most powerful form in VAX/VMS (later OpenVMS). DCL continues to be developed by VSI as part of OpenVMS. DCL is a scripting language supporting several data types, 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 lacks a DO-WHILE or other looping construct, requiring users to make do with IF and GOTO-label statements instead. DCL is available for other operating systems as well, including

VCL and VX/DCL for Unix, VCL for MS-DOS, OS/2 and Windows, PC-DCL and 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 (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 up to 8 parameters (arguments) and/or qualifiers (switches in Unix terminology) which begin with a '/' character. Unlike Unix, 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:

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 and RSX used a minimum uniqueness scheme in allowing commands to be shortened. 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-native commands are defined via CLD files; these are compiled by the CDU, the Command Definition Utility, and added to a DCL 'table' — SYS$LIBRARY:DCLTABLES.EXE 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 SYS$SYSEXE:FOO.EXE could be done with a CLD file similar to:

The user can then type "FOO", or "FOO/BAR", 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 "CREATE", to create a file, vs. CREATE/DIRECTORY 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:

the command 'FOO' will invoke FOO.EXE, and supply any additional arguments literally to the program, for example, foo -v. 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 DCL starting with V6.2 support the DCL$PATH logical name for establishing Unix-style command paths. This mechanism is known as an Automatic Foreign Command. DCL$PATH 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:

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.

In this example the variable rainbowblue is assigned the value "red", and rainbowgreen 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.

Lexical functions Lexical functions provide string functions and access to VMS-maintained data. Some Lexicals are:

F$EXTRACT(start,length,string) — extract a substring F$CVTIME — obtain date/time info, e.g. YEST_DOW=F$EXTRACT(0,3,F$CVTIME(DATE_EXPR,,"WEEKDAY")) F$ELEMENT(0," ",ABC_DEF) — for ABC_DEF = "ABC DEF" would return "ABC" F$SEARCH — searches for a file, returns a null ("") if not found F$LOCATE(needle,haystack) F$SetPRV("BYPASS,CMKRNL,ALTPRI") — it's a privilege to have access to this.

See also Comparison of command shells

References

Further reading Paul C. Anagnostopoulos; Steve Hoffman (1998). Writing Real Programs in DCL (Second ed.). Digital Press. ISBN 1-55558-191-9. The first edition of the book is available at Bitsavers: [1].

External links VSI OpenVMS DCL Dictionary: A-M VSI OpenVMS DCL Dictionary: N-Z OpenVMS.org's DCL archive

Illustrations

DIGITAL Command Language illustration

Worked examples

Example 1 — a first encounter with DIGITAL Command Language

Start with the simplest possible case. Write down what DIGITAL Command Language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DIGITAL Command Language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DIGITAL Command Language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DIGITAL Command Language

In research
DIGITAL Command Language appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DIGITAL Command Language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DIGITAL Command Language is common in secondary-school and first-year university syllabi. It links to neighbouring topics Command shells, DEC software, OpenVMS, so understanding it makes those chapters shorter.
In everyday life
Look for DIGITAL Command Language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DIGITAL Command Language” →

How to study DIGITAL Command Language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DIGITAL Command Language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DIGITAL Command Language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DIGITAL Command Language in simple terms?

DIGITAL Command Language (DCL) is the standard command language for many of the operating systems created by Digital Equipment Corporation. DCL was originally implemented for IAS as the Program Development System (PDS), and later added to RSX-11M, RT-11 and RSTS/E, but took its most powerful form i…

Why does DIGITAL Command Language matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DIGITAL Command Language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DIGITAL Command Language.

Tags

  • Command shells
  • DEC software
  • OpenVMS
  • OpenVMS software
  • Programming languages created in 1975
  • Scripting languages

Keep exploring