Download presentation
Presentation is loading. Please wait.
Published byEvan Lloyd Modified over 9 years ago
1
DCL - Digital Command Language Matthias Schmitt www.tecmumas.de 2007-04-21
2
(c) 2007 Matthias Schmitt / www.tecmumas.de2 What is DCL? Command language for interactive tasks Programming language for scripts (a.k.a. command procedures) Part of the following DEC operating systems: –OpenVMS (VAX and Alpha) –RSX-11, RSTS, RT-11 (PDP-11)
3
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de3 Origins of DCL DCL was developed in mid of 1960ies from the command languages for PDP-8, PDP-11, PDP-11 and PDP-15.
4
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de4 Basics 1 DCL commands can be used in two different modes: –Interactive –Batch Command procedures (scripts) can be used in both modes
5
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de5 Basics 2 The DCL command line consists of the following parts: [$] command [/qualifier[=value]...] [parameter [/qualifier...]] –$: Prompt –Qualifier: Modifies the action taken by the command. –Parameter: Specifies what the command acts upon. –Value: Modifies a qualifier.
6
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de6 Basics 3 Example command line: $ edit /tpu file.txt –$: Prompt (Displayed by operating system) –edit: Command (starts the editor) –/tpu: Qualifier (use the Text Processing Utility) –file.txt: Parameter (name of file to edit)
7
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de7 Basics 4 DCL is a user friendly command language. It uses English words as commands. For the convenience of the user, they can be abbreviated as soon as they are unambiguous: –$ directory /size /grand_total –$ dir /siz /g
8
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de8 Commands List of basic interactive commands: –$ directory lists contents of directory –$ create creating of files, directories –$ type /page showing the contents of a text file –$ edit editing text files –$ logout terminating the interactive session
9
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de9 Command Procedures 1 Command procedures can be run in interactive or in batch mode –interactive mode: $ @commandproc.com –batch mode: $ submit commandproc.com All lines start with the dollar (“$”) sign. Comments are marked with an “!”
10
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de10 Command Procedures 2 Program flow –GOSUB.... RETURN –GOTO –IF... THEN... ELSE... ENDIF Subroutines –CALL –SUBROUTINE... ENDSUBROUTINE
11
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de11 Lexical Functions 1 Lexical functions provide –information about the current process –information about devices and the environment –powerful tools for manipulating strings
12
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de12 Lexical Functions 2 Process information –F$DIRECTORY() returns the current directory –F$MODE() returns the mode (interactive, batch, network or other) –F$PID() returns the process ID –F$PROCESS() returns the process name
13
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de13 Lexical Functions 3 Device and Environment information –F$GETDVI(device,item) returns information about the device –F$GETQUI(function,[item],[object],[flags]) returns information about queues, batch and print jobs etc. –F$GETSYI(item,[node]) returns information about the system (local or remote)
14
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de14 Lexical Functions 4 String Manipulation –F$EDIT(string,commands) edit string –F$ELEMENT(no,del,string) extracts an element from a string of elements –F$EXTRACT(start,len,string) extracts parts –F$LENGTH(string) returns the length –F$LOCATE(part,string) searches within a string
15
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de15 Example $! INIT_ERASE_TAPE.COM $ set noverify $ if "''p1'".eqs. "" then exit $ show time $ show device 'P1 $ init /erase 'P1 leer $ show device 'P1 $ show time $ mount 'P1 leer $ dismount /unload 'P1
16
2007-04-21(c) 2007 Matthias Schmitt / www.tecmumas.de16 Further Literature VMS User’s Manual Order No. AA-LA98B-TE Digital Equipment Corporation 1989 “Kurzübersicht über OpenVMS und DCL” (in German): www.tecmumas.de
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.