|
|
|
|
Allocating and Deallocating Drives
Allocating
Drives
Use the DCL command
ALLOCATE to logically assign a disk drive or a tape drive to your
process. You might do this if you suspect an error and want to reserve
a disk while you repair the error.
The ALLOCATE command allocates only one device to a process. To allocate several devices, you must use multiple commands.
Enter the ALLOCATE command using the following format:ALLOCATE device-name[:] [logical-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.
|
logical-name
|
Specifies an optional logical name to
be associated with the specified disk or tape drive.
|
In this example, the ALLOCATE command specifies a physical device named DUA2:, which requests the allocation of a specific RK10 disk drive; that is, unit 2 on controller A. The response from the ALLOCATE command indicates that the device was successfully allocated.$
ALLOCATE DUA2:
%DCL-I-ALLOC, _MARS$DUA2: allocated
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.$
ALLOCATE/GENERIC RA90 MYDISK
For further discussion of the /GENERIC qualifier and other qualifiers that you can use with the ALLOCATE command, refer to the HP OpenVMS DCL Dictionary. The OpenVMS User's Manual contains additional examples of the ALLOCATE command.
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. HP, 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.
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.
|
The following example shows how to explicitly deallocate a tape drive or a disk drive:
In this example, the DEALLOCATE command logically disconnects tape drive MUA1: from your process. The system returns you to DCL level.$
DEALLOCATE MUA1:
|
|