Technical data
Managing Storage Media
9.2 Allocating and Deallocating Drives
2.
$ ALLOCATE/GENERIC RA90 MYDISK
This example shows how to use the /GENERIC qualifier with the ALLOCATE
command to allocate a particular type of device. In this case, the system
allocates the first available RA90 drive to your process.
For further discussion of the /GENERIC qualifier and other qualifiers that you
can use with the ALLOCATE command, refer to the OpenVMS DCL Dictionary.
The OpenVMS User’s Manual contains additional examples of the ALLOCATE
command.
9.2.2 Deallocating Drives
Allocating a device reserves that device for exclusive use by your process. The
device remains allocated to your process until you explicitly deallocate it or until
you log out.
Logging out of a process from which drives have been allocated automatically
deallocates all explicitly and implicitly allocated drives; therefore, explicitly
deallocating a disk or a tape drive that has been allocated to your process is
not necessary. Compaq, however, recommends that you use the DEALLOCATE
command (or a command procedure containing this command) explicitly to
deallocate all the drives you allocated with the ALLOCATE command.
How to Perform This Task
Use the DCL command DEALLOCATE to explicitly deallocate a disk drive or tape
drive that has been allocated to your process. A complement to the ALLOCATE
command, the DEALLOCATE command logically disconnects a drive from your
process and returns it to the pool of devices.
Enter the DEALLOCATE command using the following format:
DEALLOCATE device-name[:]
where:
device-name Specifies the drive on which the volume will be loaded. The device
name can be a physical, generic, or logical name.
Example
The following example shows how to explicitly deallocate a tape drive or a disk
drive:
$ DEALLOCATE MUA1:
In this example, the DEALLOCATE command logically disconnects tape drive
MUA1: from your process. The system returns you to DCL level.
9.3 Initializing Volumes
You initialize a disk or tape volume for one or both of the following reasons:
• To delete all old information from the volume.
• To give the volume a structure that is recognized by the operating system.
This structure prepares a volume to receive data and stores it so that the
operating system can locate it easily.
9–16 Managing Storage Media










