Technical data
Using Files and Directories
10.3 Using DCL Commands with Files
10.3 Using DCL Commands with Files
You use the DIGITAL Command Language (DCL) to perform a number of
operations on files, as shown in the following table.
Operation DCL Command
Retrieve disk and magnetic tape file information,
such as device and protection characteristics, and
display this information on your terminal screen
SHOW commands listed in Table 10–1
Modify disk file characteristics, such as protection
or UIC information
SET commands listed in Table 10–3
Display the contents of a directory DIRECTORY
Display the contents of a file TYPE
Copy files to and from disk and magnetic tape
volumes
COPY
Most DCL commands require file-structured devices. (The OpenVMS DCL
Dictionary lists commands that do not require file-structured devices.)
In addition to manipulating files through DCL, you can write programs to assist
you in routine file-manipulation tasks. You can write these programs in any of
the languages supported by the operating system.
To manipulate individual records within files (that is, to access files at the record
level), write programs that include OpenVMS Record Management Services
(RMS) facilities. Refer to the OpenVMS Record Management Services Reference
Manual for examples of RMS facilities used to manipulate files at the record
level.
10.4 Getting File Information
Use the DCL command DIRECTORY to retrieve information about disk and
magnetic tape files in a directory, using the following format:
DIRECTORY [filespec[,...]]
When you include certain command qualifiers with the DIRECTORY command,
you can retrieve information in addition to a list of the names of the files in the
directory. Refer to the OpenVMS DCL Dictionary for a list of qualifiers that you
can use with the DIRECTORY command.
The following examples illustrate three cases of retrieving information from
the [MALCOLM] directory, which resides on a disk with the logical name
DISK$DOCUMENT.
Examples
1.
$ DIRECTORY AVERAGE.*
Directory DISK$DOCUMENT:[MALCOLM]
AVERAGE.EXE;6 AVERAGE.FOR;6 AVERAGE.LIS;4 AVERAGE.OBJ;12
Total of 4 files.
Using Files and Directories 10–11










