BRMS Select Device (Q1ASLTDEV) API

Required Parameter Group:
1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Control value information Input Char(47)
5 Error code I/O Char(*)
Default Public Authority: *USE
Threadsafe: No

The BRMS select device API lets you select a device to allocate or deallocate, or to select search values such as location and media class to locate and allocate an available device for BRMS media input or output operations.

Required Parameter Group

Receiver variable
OUTPUT; Char(*)

The receiver variable that is to receive the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length of the receiver variable correctly. As a result, the API returns only the data the area can hold.

Length of receiver variable
INPUT; Binary(4)

The length of the receiver variable. The length must be at least 6 bytes.

Format name
INPUT; Char(8)

DEV00100 is the only format name available.

Control value information
INPUT; Char(*)

Information needed by the API to select a device is supplied in this structure. For more information, see the "Format of Control Value Information" section.

Error code
INPUT/OUTPUT; Char(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.

Format of Generated Information

The following table shows the format of the generated information. The DEV00100 format includes the information about the requested media volume. For a description of each field, see Field Descriptions for Generated Information.

Offset Type Field
Dec Hex
0 0 Char(10) Device name
10 0A Char(10) Location
20 14 Char(10) Media class

Field Descriptions for Generated Information

Device name
The name of the selected device.
Location
The location of the selected device.
Media class
The name of the media class used to select the device that supports the required density.

Format of Control Value Information

The following table shows the format of the control value information. For a description of each field, see Field Descriptions for Control Value Information.

Offset Type Field
Dec Hex
0 0 Char(10) Device name
10 0A Char(10) Media class
20 14 Char(10) Location
30 1E Char(10) Device action
40 28 Char(7) Operation

Field Descriptions for Control Value Information

Device name
The name of a valid tape device. A special value of *MEDCLS will instruct the API to locate an available tape device from the BRMS device information.
Location
A location name that will be used to locate an expired media volume. This value is needed only when a device special value of *MEDCLS is specified. The values are:
*ANY
Any location can be used to locate an expired volume.
location-name
Specify the name of the location used to locate an expired volume.
Media class
A media class name that will be used to locate an expired media volume. This value is needed only when a device special value of *MEDCLS is specified.
Device action
Specifies the device action that you want to used for the device. The values are:
*ALCDEV
The device is allocated.
*DLCDEV
The device is not allocated. This choice is not valid for device *MEDCLS.
Note: BRMS shared device support is implied in device selection since *ALCDEV will vary on a shared device and *DLCDEV will vary it off.
Operation
Specifies the type of device operation. Since input and output densities for a particular device may be different, the type of device operation will be used to ensure that the device selected for the specified media class is compatible with the operation being requested. The values are:
*INPUT
The operation is an input operation.
*OUTPUT
The operation is an output operation.

Error Messages

  • BRM1877 E Devices with density &3; are not available.
  • BRM1883 E Devices with density &3; are not available.
  • CPF1002 E Cannot allocate device.
  • CPF24B4 E Severe error while addressing parameter list.
  • CPF3CF1 E Error code parameter not valid.
  • CPF3C19 E Error occurred with receiver variable specified.
  • CPF3C1E E Required parameter omitted.
  • CPF3C21 E Format name &1; is not valid.
  • CPF3C24 E Length of receiver variable is not valid.
  • CPF3C3B E Value for parameter &2 for API &1 not valid.
  • CPF3C4B E Value not valid for field &1.