Retrieve Job Media Library Attributes (QTARJMA) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Qualified job name Input Char(26)
5 Internal job identifier Input Char(16)
6 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Job Media Library Attributes (QTARJMA) API retrieves the specified job's current settings for the media library attributes. For more information, see Tape information in the Storage Solutions topic.


Authorities and Locks

Job Authority
*JOBCTL, if the job for which information is retrieved has a different user profile from that of the job that calls the QTARJMA API.

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the information requested. You can specify the size of an area smaller than the format requested as long as you specify the receiver length parameter 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 8 bytes. If the variable is not long enough to hold the information, the data is truncated. If the length is larger than the size of the receiver variable, the results are not predictable.

Format name
INPUT; CHAR(8)

The format name RJMA0100 is the only valid format name used by this API. For more information, see RJMA0100 Format.

Qualified job name
INPUT; CHAR(26)

The name of the job for which information is to be returned. The qualified job name has three parts:

Job name
CHAR(10). A specific job name or the following special value:

*
The job that this program is running in. The rest of the qualified job name parameter must be blank.

*INT
The internal job identifier locates the job. The user name and job number must be blank.

User name
CHAR(10). A specific user profile name, or blanks when the job name is a special value or *INT.

Job number
CHAR(6). A specific job number, or blanks when the job name specified is a special value or *INT.

Internal job identifier
INPUT; CHAR(16)

The internal identifier for the job. The List Job (QUSLJOB) API creates this identifier. If you do not specify *INT for the job name parameter, this parameter must contain blanks. With this parameter, the system can locate the job more quickly than with a job name.

Error code
I/O; CHAR(*)

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


RJMA0100 Format

The following table lists the fields for the receiver variable in the RJMA0100 format. For more information about each field, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Offset to list of device entries
12 C BINARY(4) Number of device entries
16 10 BINARY(4) Length of a device entry
20 14 CHAR(12) Reserved
Offsets vary. These fields repeat in the order listed, for each media library device that has attributes defined. CHAR(10) Media library device
CHAR(6) Reserved
BINARY(4) Resource allocation priority
BINARY(4) Wait time for initial mount
BINARY(4) Wait time for end of volume mount
CHAR(4) Reserved


Field Descriptions

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Length of a device entry. The length, in bytes, of a device entry. A value of zero is returned if the list is empty.

Media library device. The name of the media library device that the attributes apply to. The special value supported is:

*DEFAULT The attributes apply to all media libraries that do not have attributes defined.

Number of device entries. The number of entries in the device list returned for this format. A value of zero is returned if the list is empty.

Offset to the list of device entries. The offset, in bytes, to the list of device entries returned with this format. A value of zero is returned if the list is empty.

Reserved. All reserved fields will contain hexadecimal zeros.

Resource allocation priority. The priority that the specified job will be given when the job requests a tape resource within a media library device.

Exceptions:

Wait time for end of volume mount. The maximum amount of time, in minutes, a request will wait for the allocation of a tape resource to mount the next volume after the end of volume is reached.

Exceptions:

Wait time for initial mount. The maximum amount of time, in minutes, a request will wait for the allocation of a tape resource to mount the first volume.

Exceptions:


Error Messages

Message ID Error Message Text
CPF1343 E Job &3/&2/&1 not valid job type for function.
CPF136A E Job &3/&2/&1 not active.
CPF24B4 E Severe error while addressing parameter list.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C51 E Internal job identifier not valid.
CPF3C52 E Internal job identifier no longer valid.
CPF3C53 E Job &3/&2/&1 not found.
CPF3C54 E Job &3/&2/&1 currently not available.
CPF3C55 E Job &3/&2/&1 does not exist.
CPF3C58 E Job name specified is not valid.
CPF3C59 E Internal identifier is not blanks and job name is not *INT.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF6708 E Command ended due to error.
CPF67B6 E &3/&2/&1 not authorized to do requested operation.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V4R3
Top | Backup and Recovery APIs | APIs by category