Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
DIGITAL Command Language
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Command language adopted by several operating systems (OSs)}} {{Infobox programming language | name = DIGITAL Command Language | logo = | paradigm = [[Imperative programming|imperative]] | year = | screenshot = Openvms-8.4-2L1-dcl.png | screenshot caption = OpenVMS Alpha V8.4-2L1, showing the DCL CLI in a terminal session | designer = [[Digital Equipment Corporation]]<ref name="language-1985">{{cite web|url=http://bitsavers.org/pdf/dec/vax/handbook/VMS_Language_and_Tools_Handbook_1985.pdf|title=VAX/VMS Software Language and Tools Handbook|date=1985|access-date=2020-12-31|website=bitsavers.org}}</ref> | developer = VMS Software Inc. (VSI)<ref name="users-manual" /> | latest release version = | latest release date = | latest test version = | latest test date = | typing = | implementations = | dialects = | influenced by = [[Concise Command Language|CCL]], [[RSX-11#Operation|MCR]] | influenced = [[Windows PowerShell]] | operating system = [[Interactive Application System|IAS]], [[RSTS/E]], [[RSX-11]], [[RT-11]], [[OpenVMS]], [[VAXELN]], [[DEC MICA|MICA]] | license = | website = }} '''DIGITAL Command Language''' ('''DCL''') is the standard [[command language]] for many of the [[operating system]]s created by [[Digital Equipment Corporation]]. DCL was originally implemented for [[Interactive Application System|IAS]] as the Program Development System (PDS),<ref>{{cite book|title=IAS MCR User's Guide |url=https://bitsavers.org/pdf/dec/pdp11/ias/v3.4/AA-H006C-TC_IAS_MCR_Users_Guide_199005.pdf |date=May 1990 |publisher=Digital Equipment Corporation}}</ref><ref name=DEChist75>{{cite book| title=DIGITAL EQUIPMENT CORPORATION - Nineteen Fifty-Seven To The Present| url=http://s3data.computerhistory.org/pdp-1/dec.digital_1957_to_the_present_(1978).1957-1978.102630349.pdf |date=1975 |publisher=Digital Equipment Corporation}}</ref> 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.<ref name="vms-8.4-spd">{{cite web | url = https://vmssoftware.com/docs/VSI_OVMS_SPDQS_OS_V842L1I_UPD1.pdf | title = Software Product Description and QuickSpecs - VSI OpenVMS Version 8.4-2L1 for Integrity servers | publisher = VMS Software Inc. | date = July 2019 | access-date = 2021-01-02 }}</ref> DCL is a [[scripting language]] supporting several [[data type]]s, including strings, [[Integer (computer science)|integers]], [[bit]] arrays, [[Array (data type)|arrays]] and Booleans, but not [[floating-point arithmetic|floating point]] numbers. Access to [[OpenVMS]] ''system services'' ([[Kernel (operating system)|kernel]] [[API]]) is through lexical [[Function (computer programming)|functions]], which perform the same as their [[compiled language]] counterparts and allow scripts to get information on system state. DCL includes [[Conditional (computer programming)|IF-THEN-ELSE]], access to all the [[Record Management Services]] (RMS) file types including stream, indexed, and sequential, but lacks a [[While loop|DO-WHILE]] or other [[Program loop|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 [[Microsoft Windows|Windows]], * PC-DCL<ref>{{cite web | url=https://github.com/MichelValentin/PC-DCL | title=MichelValentin/PC-DCL | website=[[GitHub]] | date=29 May 2022 }}</ref> and [https://www.oneadvanced.com/siteassets/resources/application-modernization-collateral/advanced_fact_sheet_open_dcl.pdf Open DCL] for Windows/Linux * and Accelr8 DCL Lite for Windows.<ref>{{cite web |title=Comparison of PC-DCL vs. Open DCL Lite |url=https://jonesrh.info/dcll/pcdcl_vs_dcll_comparison.html |quote=A comparison of Valentin's PC-DCL vs. Accelr8 Open DCL Lite}}</ref> 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 (computing)|library]] ({{mono|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 (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. 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: <syntaxhighlight lang="powershell"> set audit /alarm /enable=(authorization, breakin=all) show device /files $1$DGA1424: </syntaxhighlight> 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 ''[[Path (computing)|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' -- {{code|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 {{code|SYS$SYSEXE:FOO.EXE}} could be done with a CLD file similar to: <syntaxhighlight lang="text"> DEFINE VERB FOO IMAGE "SYS$SYSEXE:FOO.EXE" QUALIFIER BAR </syntaxhighlight> The user can then type "{{mono|FOO}}", or "{{mono|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 "{{mono|CREATE}}", to create a file, vs. "{{mono|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: <syntaxhighlight lang="text"> foo :== $sys$sysexe:foo.exe </syntaxhighlight> the command 'FOO' will invoke FOO.EXE, and supply any additional arguments literally to the program, for example, "{{code|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 {{mono|DCL$PATH}} logical name for establishing Unix-style command paths. This mechanism is known as an Automatic Foreign Command. {{mono|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: <syntaxhighlight lang="console"> $ TYPE SYS$INPUT: This is an example of using the TYPE verb in the DCL language. $ EXIT </syntaxhighlight> ==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. <syntaxhighlight lang="console"> $ i = 1 $ variable'i' = "blue" $ i = 2 $ variable'i' = "green" $ j = 1 $ color = variable'j' $ rainbow'color' = "red" $ color = variable'i' $ rainbow'color' = "yellow" </syntaxhighlight> In this example the variable {{mono|rainbowblue}} is assigned the value "red", and {{mono|rainbowgreen}} is assigned the value "yellow". ==Commands== The following is a list of DCL [[command (computing)|commands]] for common computing tasks that are supported by the OpenVMS [[command-line interface]].<ref name="users-manual">{{cite web|url=https://vmssoftware.com/docs/VSI_USERS_MANUAL.pdf|title=VSI OpenVMS User's Manual|date=July 2020|access-date=2021-01-27|publisher=VSI}}</ref> {{Div col|colwidth=10em}} * [[COPY (command)|COPY]] * [[COPY/FTP (command)|COPY/FTP]] * CREATE * [[DELETE (command)|DELETE]] * [[Directory (OpenVMS command)|DIRECTORY]] * EDIT * [[LOGOUT (command)|LOGOUT]] * [[PRINT (command)|PRINT]] * [[RENAME (command)|RENAME]] * [[SET (command)|SET]] * SHOW * [[Type (OpenVMS command)|TYPE]] {{Div col end}} ==Lexical functions== '''Lexical functions''' provide string functions and access to VMS-maintained data. Some Lexicals are: * {{code|F$EXTRACT(start,length,string)}} {{--}} extract a substring * {{code|F$CVTIME}} {{--}} obtain date/time info, e.g. *: {{code|lang=powershell|1=YEST_DOW=F$EXTRACT(0,3,F$CVTIME(DATE_EXPR,,"WEEKDAY"))}} * {{code|F$ELEMENT(0," ",ABC_DEF)}} {{--}} for {{code|ABC_DEF {{=}} "ABC DEF"}} would return {{code|"ABC"}} * {{code|F$SEARCH}} {{--}} searches for a file, returns a null ("") if not found * {{code|F$LOCATE(needle,haystack)}} * {{code|F$SetPRV("BYPASS,CMKRNL,ALTPRI")}} {{--}} it's a privilege to have access to this. ==See also== *[[Comparison of command shells]] ==References== {{Reflist}} ==Further reading== *{{Cite book|author1=Paul C. Anagnostopoulos|author2=Steve Hoffman|title=Writing Real Programs in DCL|edition=Second|year=1998|isbn=1-55558-191-9|publisher=Digital Press}} ==External links== *[https://vmssoftware.com/docs/VSI_DCL_DICT_VOL_I.pdf VSI OpenVMS DCL Dictionary: A-M] *[https://vmssoftware.com/docs/VSI_DCL_DICT_VOL_II.pdf VSI OpenVMS DCL Dictionary: N-Z] *[https://web.archive.org/web/20040828080028/http://dcl.openvms.org/ OpenVMS.org's DCL archive] {{Digital Equipment Corporation}} {{Authority control}} [[Category:Command shells]] [[Category:OpenVMS]] [[Category:OpenVMS software]] [[Category:Scripting languages]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:--
(
edit
)
Template:Authority control
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Code
(
edit
)
Template:Digital Equipment Corporation
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:Infobox programming language
(
edit
)
Template:Mono
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)