Add Media Library Media to BRM (ADDMLMBRM)

The Add Media Library Media to BRM (ADDMLMBRM) command allows you to add volumes to a media library (MLB). The command adds the specified media volumes to a usable category and optionally enrolls them to BRMS. If the Add volume to BRM (ADDVOL) parameter is *YES, you can specify a media class for the volume or volumes that you are adding. If the Add volume to BRM (ADDVOL) parameter and the Initialize media (INZ) parameter are both *YES, you are supplied with additional parameters such as move policy and initialization information.

To use this command, you must have the Backup Recovery and Media Services for IBM i licensed program installed.

Parameters

Keyword Description Choices Notes
MLB Media library Name Required, Positional 1
VOL Volume identifier Single values: *INSERT
Other values (up to 300 repetitions): Character value
Optional, Positional 2
ADDVOL Add volume to BRM *YES, *NO Optional
INZ Initialize media *NO, *YES Optional
MEDCLS Media class Name Optional
MOVDATE Last moved date Character value, *NONE Optional
MOVPCY Move policy Name, *NONE Optional
EXPDATE Expiration date Character value, *NONE, *PERM Optional
DEV Device Name, *MLB Optional
NEWOWNID New owner identifier Character value, *BLANK Optional
CHECK Check for active files *YES, *FIRST, *NO Optional
CODE Code *EBCDIC, *ASCII Optional
CLEAR Clear *NO, *YES Optional

Media library (MLB)

Specifies the name of the media library to which you are adding media. The MLB must be one that BRMS lists on its Work with Media Libraries display.

Volume identifier (VOL)

Specifies the volume identifier of the media being added to the BRMS media inventory.

This is a required parameter.

Single values

*INSERT
Volume identifiers that are in the insert category in a tape MLB are to be changed to a usable category within the MLB based on the value specified in the Add volume to BRM (ADDVOL) parameter. If the value specified in the Add volume to BRM (ADDVOL) parameter is *NO, only volumes already enrolled in BRMS will be changed to a usable category. If the value specified in the Add volume to BRM (ADDVOL) parameter is *YES, volumes that are currently enrolled in BRMS as well as those that are not currently enrolled in BRMS will be added to BRMS and changed to a usable category.

Note: *INSERT is not valid for optical devices.

Other values (up to 300 repetitions)

volume-identifier
Specify the identifier of the volume or volumes that you want to change within the MLB.

If the Media library (MLB) parameter is using a tape library, the volume identifier is a maximum of six characters in length.

If the Media library (MLB) parameter is using an optical library, the volume identifier is a maximum of thirty-two characters in length. If the value specified in the Add volume to BRM (ADDVOL) parameter is *YES, BRMS will use the Volume prefix specified on the System Policy to generate a unique six character name.

Add volume to BRM (ADDVOL)

Specifies whether you want to add the volumes specified in the Volume identifier (VOL) parameter to the BRMS media inventory.

*YES
You want to add the volumes specified to the BRMS media inventory. When you specify *YES, you are asked to supply a media class in the Media class (MEDCLS) parameter.
*NO
You do not want to add the volumes specified to the BRMS media inventory.

Initialize media (INZ)

Specifies whether you want to initialize the volumes specified in the Volume identifier (VOL) parameter. This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*NO
You do not want to initialize the specified volumes.
*YES
You want to initialize the specified volumes. When you specify *YES, you are asked to supply a device and initialization information. If the volume can not be initialized, the category will still be changed.

Media class (MEDCLS)

Specifies the name of a media class for the volume you are adding. Media classes can be reviewed in the Work with Media Classes display.

The media class is also used to determine the category for volumes that are being added to the media library. If the Shared media attribute in the media class is *NO, the category is changed from *INSERT to *NOSHARE, otherwise the category is changed to *SHARE400.

This is a required parameter if ADDVOL=*YES. This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

This is a required parameter if you are adding a volume.

Last moved date (MOVDATE)

Specifies the date of the last time this media volume was moved prior to being added to the media inventory.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*NONE
You are not assigning a last moved date for this media volume.
move-date
Specify the date that this volume was last moved.

Move policy (MOVPCY)

Specifies the user-defined name of a move policy that you want to use for this volume.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*NONE
You are not assigning this volume a move policy.
move-policy-name
Specify the name of the move policy that is to control the movement of this volume.

Expiration date (EXPDATE)

Specifies the expiration date of the volume that is added to the media inventory. If a date is specified, the file is protected and cannot be overwritten until the expiration date.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*NONE
The media is understood to contain no active data and can be used in backup or archive processing. Use *NONE when the volume is a new volume or when the volume is a previously used volume whose data is expired.
*PERM
The media has a permanent retention and cannot be used in backup or archive processing.
expiration-date
Specify the date after which data on the volume is considered to be non-essential and can be overwritten. The date must be specified in job date format.

Device (DEV)

Specifies the name of the device that you want to use to initialize the specified volumes. The location of the device and the location of the MLB specified in the Media library (MLB) parameter must be the same.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*MLB
Any device associated with the specified MLB can be used to initialize the specified volumes.
device-name
Specify the user-defined name of the device that you want to use to initialize the specified volumes.

New owner identifier (NEWOWNID)

Specifies the volume owner's identifier to write in the volume label of the volume being written.

Note: This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*BLANK
The owner identification field is set to blanks.
new-owner-identifier
Specify no more than 14 characters to identify the owner of the volume. If fewer than 14 characters are specified, the field is left-justified and is filled with blanks on the right.

Check for active files (CHECK)

Specifies whether a labeled volume should be checked for active data files before it is initialized for use. If an unlabeled volume is placed in the specified device, this parameter is ignored.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*YES
For tape volumes, all data file labels on the volume are checked. If any active files are found, the operation is ended and an error message is sent. For optical volumes, an error is sent if the volume is initialized.
*FIRST
Only the first data file label on the volume is checked. If there are no data files on the volume or if the first data file has expired, the volume is initialized for use without checking for any other files on the volume. If the first data file has not expired, the operation is ended and an error message is sent.

Note: For optical devices, specifying *FIRST is the same as specifying *YES.

*NO
Volume initialization continues with no checking for active files.

Code (CODE)

Specifies the character code in which the volume label is written. All data that is not save/restore data written after the label must be in the same code; codes cannot be intermixed on a volume that is not a save/restore volume.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

Note: For optical devices this parameter is ignored.

*EBCDIC
The volume label is written in EBCDIC and is an IBM standard label; all additional data must also be written in EBCDIC.
*ASCII
The volume label is written in ASCII and is an American National Standard Institute standard label; all additional data must also be written in ASCII.

Clear (CLEAR)

Specifies whether all labels and data are to be deleted from the volume when it is initialized for use. If the volume must be cleared of all data, it is deleted from the location of the volume label or tape marks to the end of the tape marker.

For an optical device this parameter only applies when the volume media type is *DVD-RAM.

Note: If the volume media type is *WORM the volume is never cleared regardless of the parameter setting. If the volume media type is *ERASE the volume is always cleared regardless of the parameter setting.

This parameter is ignored if ADDVOL=*NO or the volume is already enrolled in the BRMS media inventory.

*NO
Existing data is not deleted. Even though the existing data is not deleted, the data on the volume is not usable after the volume has been initialized for use.
*YES
After the beginning of the volume has been initialized for use, the remaining data on the volume is deleted.

Note: For optical devices, this option may take several hours to complete, depending on the media capacity.

Examples

Example 1: Adding a Volume to a Media Library

ADDMLMBRM MLB(MLB01) VOL(T00001)
          INZ(*NO) ADDVOL(*NO)

This command adds volume T00001 to the media library MLB01, but the volume is not initialized. Volume T00001 must be a member of the BRMS media inventory.

Example 2: Adding and Initializing a Volume to BRMS

ADDMLMBRM MLB(MLB01) VOL(*INSERT)
          INZ(*YES) MEDCLS(CART3490E)

This command adds all volumes that are in the *INSERT category to the media library MLB01, and adds the volumes to the BRMS media inventory as media of class CART3490E. The volumes are initialized with the density specified in media class CART3490E.

Error messages

*ESCAPE Messages

BRM1134
Device &1 not found.
BRM1342
Volume identifier &2 not correct.
BRM1707
Media library &1 not found or not defined.
BRM1763
Device &1 cannot be used.
BRM1917
Feature not installed.
BRM1921
Feature not licensed.
BRM4040
Access denied for user &1.
BRM4041
Access denied for user &1.
BRM40A2
BRMS product initialization required.
CPF9800
All CPF98xx messages could be signaled. xx is from 01 to FF.