ADDTAPCTG (Add Tape Cartridge)
ADDTAPCTG Command syntax diagram
Purpose
The Add Tape Cartridge (ADDTAPCTG) command adds the specified cartridge identifiers to a usable category. Cartridges are placed in the insert category when they are placed in the library device and must be added to a usable category before they can be used by a tape device.
The cartridge identifier must be unique within a library device. If a duplicate cartridge identifier exists in a library device, both cartridges are unusable until one is physically removed from the library device.
Required Parameters
- DEV
- Specifies the name of the library device to be used. The device name must have been created previously on the system using the Create Device Media Library (CRTDEVMLB) command.
- CTG
- Specifies a maximum of 40 cartridge identifiers that are currently in the insert category and that are to be added to the category specified. Each cartridge identifier can be a maximum of 6 characters.
Note: The cartridge identifier should be the same as the external identifier if the library device has a bar code scanner to read external identifiers.
Optional Parameters
- CGY
- Specifies the category to which the tape cartridge is added. The cartridge is moved to a slot in the library device, unless the cartridge is added to the convenience (CNV) category.
Element 1: Category Name
*NOSHARE: The cartridge identifier specified cannot be shared with other systems that are attached to the same device.
*IPL: The cartridge identifier specified can be used for an alternate initial program load (IPL) of a system. The management of the cartridges in this category must be done by the user.
Attention
When using this category, ensure that the cartridges are the proper ones to be used for the alternate IPL. Conflicts can arise if high-end and low-end systems are attached to the same library device.
*NL: The cartridge is used as a non-labeled tape.
*CNV: The cartridge identifier specified is added to the special convenience category. It is not moved to a slot in the library device. When the cartridge is unloaded from a device, it is removed (exported) to the convenience station.
category-name: Specify the name of a user-defined category. This category name must have been created previously with the Create Tape Category (CRTTAPCGY) command.
Element 2: Category System
This element identifies the system to which the category belongs. The system name is obtained from the pending system name field of a Display Network Attributes (DSPNETA) command. If there is no pending system name, the current system name attribute is used.
Attention
If a system name is changed, the tape cartridges in library devices that have the attribute of the system name before it was changed are no longer valid.
*CURRENT: The category belongs to the system currently running the command.
system-name: Specify the name of the system to which the category belongs.
Single Value
*SHARE400: The cartridge identifier specified can be shared with other iSeries 400 computers that are attached to the same device.
- CHKVOL
- Specifies whether the logical volume identifier is forced to be identical to the external identifier if the library device has a bar code scanner to read the bar code identifier.
*YES: The tape cartridge is verified for the correct logical volume identifier by reading the volume label existing on the tape cartridge.
*NO: The tape cartridge is not verified for the correct logical volume identifier. If a cartridge is added for which the external identifier does not match the logical volume identifier, the cartridge is valid for read-only operations. Output operations to the tape cartridge are not allowed unless the logical volume identifier is initialized to match the external identifier. If the tape is a non-labeled tape, this match is not enforced because there is no logical volume identifier.
Examples for ADDTAPCTG
Example 1: Adding a Single Cartridge to the *SHARE400 Category
ADDTAPCTG DEV(LIB01) CTG(VOL4) CGY(*SHARE400) CHKVOL(*NO)This command adds the cartridge identifier VOL4 to the usable category *SHARE400. The logical volume identifier in the volume labels of VOL4 are not verified.
Example 2: Adding Multiple Cartridges to the *NOSHARE Category
ADDTAPCTG DEV(LIB01) CTG(VOL1 VOL2 VOL3) CGY(*NOSHARE) CHKVOL(*YES)This command adds the cartridge identifiers VOL1, VOL2, and VOL3 to the usable category *NOSHARE. The logical volume identifiers on the tape cartridges are verified when the command is run.
Error messages for ADDTAPCTG
*ESCAPE Messages
- CPF67AB
- &6 cartridges not added
- CPF67A6
- Category does not exist
- CPF67D2
- Cartridge does not exist
- CPF67E4
- Library device function not successful
- CPF67EA
- Function not successful
- CPD67EB
- Cartridge &2 not in *INSERT category
- CPF67EC
- Library device description &1 does not exist
- CPF67ED
- Library device &1 not available
- CPF67F5
- Duplicate cartridge ID found
- CPF6708
- Command ended due to error.
- CPF6718
- Cannot allocate device &1.
- CPF6745
- Device &1 not a media library device.
- CPF9814
- Device &1 not found.
- CPF9825
- Not authorized to device &1.