| Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Add Media to BRM (ADDMEDBRM) command adds a media volume to the BRMS media inventory. The volume can be a volume from another media inventory that contains active data, the volume can be a volume from some other outside source, or a new volume that you want to initialize. Once added, BRMS tracks the volume's characteristics, location, use and content.
When you add the volume, you must specify the media class of the volume. You can also specify how you want the volume to move, where the volume is located, its container (if any) and other miscellaneous attributes.
If the numbering scheme of the volumes that you are adding is consecutive, the ADDMEDBRM command will automatically add the volumes without having to add the volumes one at a time.
Virtual media and devices can be used with this command. The following restrictions apply to the use of virtual media and virtual devices.
To use this command, you must have the Backup Recovery and Media Services for IBM i licensed program installed.
Restrictions:
TAPxxx
NLTxxx
BLKxxx
CLNxxx
ERRxxx
SLTxxx
IMPxxx
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| VOL | Volume identifier | Character value | Required, Positional 1 |
| MEDCLS | Media class | Name | Required, Positional 2 |
| VOLCNT | Number to add | 1-999, 1 | Optional |
| INZ | Initialize media | *NO, *YES | Optional |
| EXPDATE | Expiration date | Character value, *NONE, *PERM | Optional |
| MOVDATE | Last moved date | Character value, *NONE | Optional |
| MOVPCY | Move policy | Name, *NONE | Optional |
| CRTDATE | Creation date | Date, *CURRENT | Optional |
| SLOT | Slot number | 1-999999, *NEXT, *NONE | Optional |
| SYSNAME | System | Name, *LCL | Optional |
| TEXT | Text | Character value, *NONE | Optional |
| IMGCLG | Image catalog | Name, *NONE | Optional |
| DEV | Device | Name | Optional |
| NEWOWNID | New owner identifier | Character value, *BLANK | Optional |
| CHECK | Check for active files | *YES, *FIRST, *NO | Optional |
| CODE | Code | *EBCDIC, *ASCII | Optional |
| ENDOPT | End of media option | *REWIND, *UNLOAD | Optional |
| CLEAR | Clear | *NO, *YES | Optional |
| NXTVOLMSG | Next volume message | *YES, *NO | Optional |
| DLY | Volume mount delay | 1-900, *DEV, *IMMED | Optional |
| LOC | Location | Name, *HOME | Optional |
| CNR | Container ID | Name, *NONE | Optional |
| USECNT | Media uses | Decimal number, 0 | Optional |
| READERR | Read errors | Decimal number, 0 | Optional |
| WRTERR | Write errors | Decimal number, 0 | Optional |
| BYTEREAD | Bytes read | Decimal number, 0 | Optional |
| BYTEWRT | Bytes written | Decimal number, 0 | Optional |
| CURBYTES | Current bytes written | Decimal number, 0 | Optional |
| MAXBYTES | Maximum bytes written | Decimal number, 0 | Optional |
| LASTCLN | Last clean date | Date, *NONE | Optional |
| USECLN | Uses since cleaning | Decimal number, 0 | Optional |
| Top |
Specifies the identifier of the volume being added to the BRMS media inventory. If the volume is being added to a media class using a virtual density, the volume-identifier must match the Volume name of the image catalog entry.
For volumes that specify a Media class (MEDCLS) parameter using an optical format, the volume identifier is a maximum of thirty-two characters in length. BRMS media inventory requires a six character volume serial. BRMS will use the Volume prefix specified on the System Policy to generate a unique six character name for BRMS to use. The volume identifier specified on the Volume identifier (VOL) parameter is the name that user applications will use to refer to the volume, but BRMS will use the six character volume serial that was generated by BRMS.
This is a required parameter.
For volumes that specify a Media class (MEDCLS) parameter using a tape density, the volume identifier is a maximum of six characters in length. The identifier must contain only alphanumeric characters (A through Z and 0 through 9), and cannot contain blanks.
For volumes that specify a Media class (MEDCLS) parameter using an optical format, the volume identifier is a maximum of thirty-two characters in length. The identifier must contain only alphabetic characters (A through Z), numeric characters (0 through 9), hyphen (-), underscore (_), or a period (.). The first character must be alphabetic or numeric and cannot contain blanks.
| Top |
Specifies the user-defined name of a media class for the volume you are adding. Media classes can be reviewed in the Work with Media Classes display.
This is a required parameter.
| Top |
Specifies the number of volumes to add during this session. The value specified in the Volume identifier (VOL) parameter is increased by 1 for each volume added until the end of the count is reached. If the new volume identifier cannot be increased because of the way a volume is named, such as TAPEB9, an error message is sent. Volume serial TAPEB9 is not in the correct format for adding multiple media because there are not enough digits at the end of the volume to handle an add count without extending the entered length.
Note: You can add a maximum of 999 volumes at a time, even though the field can hold up to 31 digits.
For volumes that specify a Media class (MEDCLS) parameter using a tape density, specifying a "5" would add 5 volumes, each volume being increased by 1, such as T00001, T00002, T00003 and so on. The first volume (T00001 in the above example) is the volume specified in the Volume identifier (VOL) parameter.
For volumes that specify a Media class (MEDCLS) parameter using an optical format, specifying a "5" with a first volume specified in the Volume identifier (VOL) parameter would add 5 volumes. When adding these volumes, the Volume prefix specified on the System Policy (M for this example) will be used to create the volume serial associated with each volume identifier. Each volume serial and volume identifier will be increased by one, resulting in a volume serials of M00001, M00002, M00003 and so on, with volume identifiers of VOL00001, VOL00002, VOL00003 and so on.
| Top |
Specifies whether the volumes that you are adding are to be initialized.
If you specify *YES for the Initialize media (INZ) parameter, you must specify the Device (DEV) parameter. You must specify a device of category *VRTTAP if the media class uses a virtual density (*VRT32K *VRT64K *VRT240K *VRT256K). You must specify a device of category *VRTOPT if the media class uses a virtual density (*VRTUDF).
| Top |
Specifies the expiration date of the media 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.
| Top |
Specifies the last date this volume was moved prior to being added to the media inventory.
| Top |
Specifies the user-defined name of a move policy that you want to use for this volume.
Note: Virtual media cannot be moved. Move policies are assigned to virtual volumes so the policy can be replicated to the output media when the virtual volume is duplicated.
| Top |
Specifies the date that the first file on this volume was written.
| Top |
Specifies the slot number for the volume that you have selected to add.
Note: This parameter is ignored if the Device (DEVICE) parameter specified is an optical device.
| Top |
Specifies the system identifier for the volume that you are adding.
Note: The BRMS Network feature (Option 1) is required to use this value.
Note: The BRMS Network feature (Option 1) is required to use this value.
| Top |
Specifies text to describe the media that you are adding.
| Top |
Specifies the name of the image catalog for a volume being added which is a virtual volume. The image catalog and image catalog entry for the volume being added must exist before you can add and initialize the virtual volumes.
Note: Use GO CMDCLG and GO CMDCLGE to view the menus for commands used to manage image catalogs and image catalog entries.
| Top |
Specifies the name of the device which is used to initialize the volume. This is a required parameter when *YES is specified in the Initialize media (INZ) parameter. The device you specify must be defined in the BRMS device table, as shown on the WRKDEVBRM display and the device must be compatible with the specified Media class (MEDCLS) parameter.
| Top |
Specifies the volume owner's identifier to write in the volume label of the volume being written.
| Top |
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.
Note: For optical devices, specifying *FIRST is the same as specifying *YES.
| Top |
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.
Note: For optical devices this parameter is ignored.
| Top |
Specifies whether the volume is only rewound, or rewound and unloaded after it has been initialized for use.
Note: For optical devices, *UNLOAD is the only special value supported, other special values will be ignored.
| Top |
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 volume marks to the end of the volume 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.
Note: For optical devices, this option may take several hours to complete, depending on the media capacity.
| Top |
Specifies whether you want BRMS to notify you through messages to place another volume on a device.
Note: This parameter is ignored if the Device (DEVICE) parameter specified is an optical device.
| Top |
Specifies how long you want the device to delay before it begins processing the next volume on a device.
Note: This parameter is ignored if the Device (DEVICE) parameter specified is an optical device.
| Top |
Specifies the name of the storage location for the volume you are adding. Storage locations are used to hold media and containers. Storage locations can be local, that is, your computer room, or volume inventory or offsite, like a vault or vaulting service. Storage location names are user-defined.
Storage locations are set up in the Work with Storage Locations display. The choices on the command reflect the locations that you have set up.
| Top |
Specifies the name of a container to which you want to add this volume. The container must be of a class that can accommodate this type of media.
| Top |
Specifies the number of times that a media volume has been read from or written to. When the volume exceeds the usage threshold value for media in its media class, it should be taken out of service and replaced with a newer volume. The usage threshold value can be reviewed in the Work with Media Classes display. Media uses is expressed in number of uses.
| Top |
Specifies the number of read errors that have been recorded for each media volume in the media inventory. When the number of read errors exceeds the value specified in the read error threshold for a volume's media class, the volume should be replaced with a new volume. The read error threshold value can be reviewed in the Work with Media Classes display. Read errors are expressed in kilobytes per read error.
The following guidelines can be used to determine the Read error threshold value for your media class. If a volume or cartridge exceeds the criteria, copy the contents to a new volume and discard the old volume.
If all volumes used in a single drive exceed these criteria, the read/write heads are probably dirty. You should also discard tape reels and tape cartridges with a hard read error.
| Top |
Specifies the number of write errors that have been recorded for each media volume in the media inventory. When the number of write errors exceeds the value specified in the write error threshold for a volume's media class, the volume should be replaced with a new volume. The write error threshold value can be reviewed in the Work with Media Classes display. Write errors are expressed in kilobytes per write error.
The following guidelines can be used to determine the Write error threshold value for your media class. If a volume or cartridge exceeds the criteria, copy the contents to a new volume and discard the old volume.
If all tapes used in a single drive exceed these criteria, the read/write heads are probably dirty. You should also discard volumes and tape cartridges with a hard write error.
| Top |
Specifies the number of bytes read (in millions of bytes) from the volume since its creation date.
| Top |
Specifies the number of bytes written (in millions of bytes) to the volume since its creation date.
| Top |
Specifies the number of bytes currently written (in millions of bytes) on the media volume.
| Top |
Specifies the maximum number of bytes (in millions of bytes) that can be written to this volume.
| Top |
Specifies the last date that the media volume was cleaned.
| Top |
Specifies the number of uses since the last cleaning. When this number equals or exceeds the uses before cleaning parameter for this media class, the volume should be cleaned before using it further. The uses before cleaning value can be reviewed in the Work with Media Classes display.
| Top |
Example 1: Adding a Volume to BRMS
ADDMEDBRM VOL(T00001) MEDCLS(QIC1000)
This command adds volumes to the BRMS media inventory. In this example, volume T00001 is assigned a media class of QIC1000 and is added to the BRMS media inventory. The volume is not initialized and is added as expired.
Example 2: Adding and Initializing a Volume to BRMS
ADDMEDBRM VOL(T00002) MEDCLS(QIC1000)
INZ(*YES) DEV(TAP01)
This command adds the volume T00002 to the BRMS media inventory with a media class of QIC1000. The volume is initialized using device TAP01.
Example 3: Adding a Virtual Volume to BRMS
ADDMEDBRM VOL(VRT001) MEDCLS(VRT256K)
INZ(*YES) DEV(VRTTAP) IMGCLG(VRTIMGCLG)
This command adds the virtual volume VRT001 to the BRMS media inventory with a media class of VRT256K. The volume is initialized using device VRTTAP. Image catalog VRTIMGCLG contains the image catalog entry for VRT001.
Example 4: Adding and Initializing an Optical Volume to BRMS
ADDMEDBRM VOL(VOL0000001) MEDCLS(OPTUDF)
INZ(*YES) DEV(OPT01)
For this example the Volume prefix specified on the System Policy is set to M. This command adds a volume with volume serial M000001 and a volume identifier VOL0000001 to the BRMS media inventory with a media class of OPTUDF. The volume is initialized as VOL0000001 using device OPT01.
Example 5: Adding and Initializing Multiple Optical Volumes to BRMS
ADDMEDBRM VOL(VOLUMEIDENTIFIER0000001) MEDCLS(OPTUDF)
VOLCNT(5) INZ(*YES) DEV(OPT01)
For this example the Volume prefix specified on the System Policy is set to V. This command adds volumes with volume serials V00001, V00002, V00003, V00004, and V00005, with corresponding volume identifiers of VOLUMEIDENTIFIER0000001, VOLUMEIDENTIFIER0000002, VOLUMEIDENTIFIER0000003, VOLUMEIDENTIFIER0000004, and VOLUMEIDENTIFIER0000005 to the BRMS media inventory with a media class of OPTUDF. The volumes are initialized as VOLUMEIDENTIFIER0000001, VOLUMEIDENTIFIER0000002, VOLUMEIDENTIFIER0000003, VOLUMEIDENTIFIER0000004, and VOLUMEIDENTIFIER0000005 using device OPT01.
| Top |
*ESCAPE Messages
| Top |