HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary


Previous Contents Index


ALLOCATE

Provides your process with exclusive access to a device until you deallocate the device or terminate your process. Optionally associates a logical name with the device.

Requires read (R), write (W), or control access.


Format

ALLOCATE device-name[:][,...] [logical-name[:]]


Parameters

device-name[:][,...]

Specifies the name of a physical device or a logical name that translates to the name of a physical device. The device name can be generic: if no controller or unit number is specified, any device that satisfies the specified part of the name is allocated. If more than one device is specified, the first available device is allocated.

logical-name[:]

Specifies a string of 1 to 255 alphanumeric characters. Enclose the string in single quotation marks (` ') if it contains blanks. Trailing colons (:) are not used. The name becomes a process logical name with the device name as the equivalence name. The logical name remains defined until it is explicitly deleted or your process terminates.

Qualifiers

/GENERIC

/NOGENERIC (default)

Indicates that the first parameter is a device type rather than a device name. Example device types are: RX50, RD52, TK50, RC25, RCF25, and RL02. The first free, nonallocated device of the specified name and type is allocated.

The /[NO]GENERIC qualifier is placed before the device-name parameter in the ALLOCATE command line. For example, you can allocate an RK07 device by entering the following command at the DCL prompt ($):


$ ALLOCATE/GENERIC RK07 DISK

The following table shows some device types that you can specify with the /GENERIC qualifier. To see what devices are available, refer to your SPD for the OpenVMS version they are currently using.

Devices by Classification
Disk Devices
EF51 EF52 EF53 EF54 EF58
ESE20 ESE25 ESE52 ESE56 ESE58
EZ31 EZ31L EZ32 EZ32L EZ33
EZ33L EZ34 EZ35 EZ51 EZ52
EZ53 EZ54 EZ56R EZ58 HSZ10
HSZ15 HSZ20 HSZ40 ML11 RA60
RA70 RA71 RA72 RA73 RA80
RA81 RA82 RA90 RA92 RAH72
RB02 RB80 RC25 RCF25 RD26
RD31 RD32 RD33 RD51 RD52
RD53 RD54 RF30 RF31 RF31F
RF32 RF35 RF36 RF37 RF70
RF71 RF72 RF73 RF74 RF75
RFF31 RFH31 RFH32 RFH35 RFH72
RFH73 RK06 RK07 RL01 RL02
RM03 RM05 RM80 RP04 RP05
RP06 RP07 RP07HT RX01 RX02
RX04 RX18 RX23 RX23S RX26
RX33 RX33S RX35 RX50 RZ01
RZ13 RZ14 RZ15 RZ16 RZ17
RZ18 RZ22 RZ23 RZ23L RZ24
RZ24L RZ25 RZ25L RZ26 RZ26B
RZ26L RZ26M RZ27 RZ27B RZ27L
RZ28 RZ28B RZ28L RZ29 RZ29B
RZ31 RZ34L RZ35 RZ35L RZ36
RZ36L RZ37 RZ38 RZ55 RZ55L
RZ56 RZ56L RZ57 RZ57I RZ57L
RZ58 RZ59 RZ72 RZ73 RZ73B
RZ74 RZ74B RZ75 RZ75B RZF01
Compact Disk Devices
RRD40 RRD40S RRD42 RRD43 RRD44
RRD50 RV20 RV60 RV80 RW504
RW510 RW514 RW516 RWZ01 RWZ21
RWZ31 RWZ51 RWZ52 RWZ53 RWZ54
Tape Devices
TA78 TA79 TA81 TA85 TA86
TA87 TA90 TA90E TA91 TAD85
TAPE9 TD34 TD44 TE16 TF30
TF70 TF85 TF86 TK50 TK50S
TK60 TK70 TK70L TKZ09 TKZ60
TL810 TL820 TLZ04 TLZ06 TLZ07
TLZ6 TLZ7 TM32 TS11 TSZ05
TSZ07 TSZ08 TU45 TU56 TU58
TU77 TU78 TU80 TU81 TZ30
TZ30S TZ85 TZ857 TZ86 TZ865
TZ867 TZ87 TZ875 TZ877 TZ88
TZ885 TZ887 TZ89 TZ895 TZ897
TZK10 TZK11 TZX0    

/LOG (default)

/NOLOG

Displays a message indicating the name of the device allocated. If the operation specifies a logical name that is currently assigned to another device, then the superseded value is displayed.

Examples

#1

$ ALLOCATE  DMB2:
%DCL-I-ALLOC, _DMB2: allocated
      

The ALLOCATE command in this example requests the allocation of a specific RK06/RK07 disk drive, that is, unit 2 on controller B. The system response indicates that the device was allocated successfully.

#2

$ ALLOCATE  MT,MF:   TAPE:
%DCL-I-ALLOC, _MTB2: allocated
.
.
.
$ SHOW LOGICAL TAPE:
TAPE: = _MTB2:    (process)
$ DEALLOCATE TAPE:
$ DEASSIGN TAPE:
      

The ALLOCATE command in this example requests the allocation of a tape device whose name begins with MT or MF and assigns it the logical name TAPE. The ALLOCATE command locates an available tape device whose name begins with MT, and responds with the name of the device allocated. (If no tape device beginning with MT had been found, the ALLOCATE command would have searched for a device beginning with MF.) Subsequent references to the device TAPE in user programs or command strings are translated to the device name MTB2.

When the tape device is no longer needed, the DEALLOCATE command deallocates it and the DEASSIGN command deletes the logical name. Note that the logical name TAPE was specified with a colon on the ALLOCATE command, but that the logical name table entry does not have a colon.

#3

$ ALLOCATE/GENERIC RL02 WORK
%DCL-I-ALLOC, _DLA1: allocated
%DCL-I-SUPERSEDE, previous value of WORK has been superseded
      

The ALLOCATE command in this example requests the allocation of any RL02 disk device and assigns the logical name WORK to the device. The completion message identifies the allocated device and indicates that the assignment of the logical name WORK supersedes a previous assignment of that name.

#4

$ ALLOCATE $TAPE1
%DCL-I-ALLOC, _MUA0: allocated
      

The ALLOCATE command in this example allocates the tape device MUA0, which is associated with the logical name $TAPE1.

#5

$ ALLOCATE /GENERIC RX50 ACCOUNTS
      

The ALLOCATE command in this example allocates the first free diskette drive and makes its name equivalent to the process logical name ACCOUNTS.


Previous Next Contents Index