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
(section)
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!
==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.
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)