The QUSRBRM.MEDIA_LIBRARY_MEDIA_INFO procedure returns media information for the specified media library device.
Parameters
|
|
|
|
|
|
|
media-library
Specifies the name of the media library device you wish to retrieve media information from.
Possible values are:
media-library | Specifies the name of the media library device you wish to retrieve media information from. |
volume-id
Specifies the volume identifier you wish to retrieve media information for.
Possible values are:
*ALL | Include all media for the selected media library. |
generic*-volume-id | Specify the generic name of a volume. The generic name must end with a *. |
volume-id | Specifies a single volume identifier to retrieve information for. |
category
Specifies which media by category from the selected media library to include.
Note: This parameter is ignored if the media library specified is an optical device.
Possible values are:
*ALL | Include all media categories for the selected media library. Note: If you have defined your own media categories, they will not be included when you specify *ALL. |
*EJECT | Only media in the eject mode in the selected media library are included. |
*INSERT | Only media already in the media library which does not have a category such as *SHARE400 or *NOSHARE and which are otherwise not assigned to a system are included. |
*IPL | Only alternate IPL media in the selected media library are included. |
*NL | Only non-labeled media in the selected media library are included. |
*NOSHARE | Only private media already added to the media library are included. Private media are those which are only able to be used by this system. |
*SHARE400 | Only share media already added to the media library are included. |
brm-volume
Specifies whether you want to include only BRMS media, non-BRMS media or any media.
Possible values are:
*ANY | Any media, whether registered in BRMS or not, is included. |
*NO | Only non-BRMS media is included. |
*YES | Only media registered in BRMS is included |
media-class
Specifies the media class that you want to select from the specified media library.
Possible values are:
*ALL | Select all media regardless of the media class. |
media-class-name | Specify the name of the media class that you want to include from the selected media library. |
brms-status
Specifies the BRMS status of media you want to select from the specified media library.
Possible values are:
*ALL | Select all media regardless of BRMS status. This includes non-BRMS media. |
*ACT | Select only active volumes. |
*ERR | Select only volumes flagged in error. |
*EXP | Select only expired volumes. |
*INZ | Select only volumes requiring initialization before they can be used. |
Returned Table - for TAPE devices
The following table describes the columns returned for a tape device by this procedure. The schema is QUSRBRM.
Column Name | Data Type | Description |
VOLUME_ID | VARCHAR(6) | The 6 character volume identifier. |
MEDIA_TYPE | VARCHAR(2) | The media type. |
CATEGORY | VARCHAR(10) | The tape category. |
STATUS | VARCHAR(28) | The tape status. |
MEDIA_CLASS | VARCHAR(10) | The BRMS media class assigned to the tape. |
BRMS_STATUS | VARCHAR(4) | The BRMS status of the tape. |
Returned Table - for OPTICAL devices
The following table describes the columns returned for a tape device by this procedure. The schema is QUSRBRM.
Column Name | Data Type | Description |
VOLUME_ID | VARCHAR(32) | The 32 character volume identifier. |
VOLUME_SERIAL | VARCHAR(6) | The 6 character volume serial. |
VOLUME_TYPE | VARCHAR(12) | The volume type. |
MEDIA_TYPE | VARCHAR(8) | The optical media type. |
MEDIA_CLASS | VARCHAR(10) | The BRMS media class assigned to the tape. |
BRMS_STATUS | VARCHAR(4) | The BRMS status of the tape. |
Examples
Example 1 - Show all media in media library TAPMLB01
CALL QUSRBRM.MEDIA_LIBRARY_MEDIA_INFO ('TAPMLB01', '*ALL', '*ALL', '*ANY', '*ALL', '*ALL')
Example output:
VOLUME_ID | MEDIA_TYPE | CATEGORY | STATUS | MEDIA_CLASS | BRMS_STATUS |
SHRT01 | L3 | *SHARE400 | Available | SHORTY | *EXP |
SHRT04 | L3 | *SHARE400 | Available | SHORTY | *ACT |
SHRT07 | L3 | *INSERT | Inserted | *NONE | |
SHRT81 | L3 | *NOSHARE | Available | *NONE |
Example 2 - Show all media that starts with '00213' in media library TAPMLB01
CALL QUSRBRM.MEDIA_LIBRARY_MEDIA_INFO ('TAPMLB01', '00213*', '*ALL', '*ANY', '*ALL', '*ALL')
Example output:
VOLUME_ID | MEDIA_TYPE | CATEGORY | STATUS | MEDIA_CLASS | BRMS_STATUS |
002131 | L3 | *INSERT | Inserted | *NONE | |
002132 | L3 | *INSERT | Inserted | *NONE | |
002133 | L3 | *INSERT | Inserted | *NONE | |
002134 | L3 | *INSERT | Inserted | *NONE |
Example 3 - Show all media with BRMS Media Class = 'ULTRIUM3' in media library TAPMLB01
CALL QUSRBRM.MEDIA_LIBRARY_MEDIA_INFO ('TAPMLB01', '*ALL', '*ALL', '*ANY', 'ULTRIUM3', '*ALL')
Example output:
VOLUME_ID | MEDIA_TYPE | CATEGORY | STATUS | MEDIA_CLASS | BRMS_STATUS |
000012 | L3 | *INSERT | Inserted | ULTRIUM3 | *EXP |
000016 | L3 | *NOSHARE | Available | ULTRIUM3 | *EXP |
000021 | L3 | *SHARE400 | Available | ULTRIUM3 | *EXP |
Example 4 - Show all BRMS expired media in media library TAPMLB01
CALL QUSRBRM.MEDIA_LIBRARY_MEDIA_INFO ('TAPMLB01', '*ALL', '*ALL', '*ANY', '*ALL', '*EXP')
Example output:
VOLUME_ID | MEDIA_TYPE | CATEGORY | STATUS | MEDIA_CLASS | BRMS_STATUS |
SHRT01 | L3 | *SHARE400 | Available | SHORTY | *EXP |
000000 | L3 | *INSERT | Inserted | PTFBACKUPS | *EXP |
000012 | L3 | *INSERT | Inserted | ULTRIUM3 | *EXP |
Error Messages
The following SQL error messages SQLSTATEs may be returned by this procedure.
U0001 | Media library &1 not found or not defined. |
U0002 | Category not valid for parameter CGY. or Category does not exist. |
U0003 | BRMS Volume not valid. |
U0004 | Media class &1 not found. |
U0005 | BRMS Status not valid. |
U9999 | Illegal execution. |