SETTAPCGY (Set Tape Category)
SETTAPCGY Command syntax diagram
Purpose
The Set Tape Category (SETTAPCGY) command sets the category for a resource in a specified media library device. The system automatically loads cartridges from the specified category in the order specified on the cartridge order (CTGORDER) parameter.
Required Parameters
- MLB
- Specifies the name of the media library device for which the category is set.
- OPTION
- Specifies which option is set for the specified media library device.
*MOUNTED: The category specified on the CGY parameter is considered mounted and any tape operation with VOL(*MOUNTED) specified uses the tape cartridges from the category that is mounted.
*DEMOUNTED: The category specified on the CGY parameter is no longer mounted. The use of VOL(*MOUNTED) is not valid for the media library device.
*ASSIGN: The mounted category session specified on the MNTID parameter is assigned to the job issuing the SETTAPCGY command. The mounted category session being assigned must have been previously mounted and released.
*RELEASE: The mounted category session assigned to the job issuing the SETTAPCGY command is released and is available for another job to assign.
Optional Parameters
- CGY
- Specifies the category to be mounted. This parameter is valid only when OPTION(*MOUNTED) is specified.
Element 1: Category name
*NOSHARE: The cartridge identifiers cannot be shared with other systems that are attached to the same device. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.
*IPL: The cartridge identifiers can be used for an alternate initial program load (IPL) of the system. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.
*NL: The cartridge is used as a non-labeled tape. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.
*CNV: The cartridge identifier is added to the special convenience category. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.
category-name: Specify the name of a user-defined category. The cartridge identifiers in the category specified are mounted in the order specified in the CTGORDER parameter.
Element 2: Category system
Specifies the name of 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 media 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 Values:
*SHARE400: The cartridge identifier can be shared by all iSeries 400 that are attached to the media library device. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.
- CTGORDER
- Specifies the order in which the cartridges are mounted. This parameter is valid only when OPTION(*MOUNTED) is specified.
*SEQ: The cartridges are mounted in the order they were added or changed to the category specified. The operation ends if the next cartridge in the sequential order is not available.
*NEXTAVAIL: The cartridges are mounted in a sequential order, but if a cartridge in the order is not available, the next available cartridge is used.
- TGTCGY
- Specifies the category to which a tape cartridge is changed after it is used. This parameter can be useful when a scratch category is set for use during a save operation. Each category is automatically changed to the specified target category specified after it is used. This parameter is valid only when OPTION(*MOUNTED) is specified.
Element 1: Target category name
*CGY: The cartridges remain in the category specified on the CGY parameter.
*NOSHARE: The cartridge identifiers are changed to the *NOSHARE category.
*IPL: The cartridge identifiers are changed to the *IPL category.
*NL: The cartridge identifiers are changed to the *NL category.
category-name: Specify the name of a user-defined category. The cartridge identifiers are changed to the specified user-defined category.
Element 2: Target category system
Specifies the name of the system to which the target category belongs. The system name is obtained from the pending system name field of the Display Network Attributes (DSPNETA) command. If there is no pending system name, the current system name attribute is used.
Attention:
If the system name is changed, the tape cartridges in media library devices that have the attribute of the system name before it was changed are no longer valid.
*CURRENT: The system currently running the command is used.
system-name: Specify the name of the system that the category belongs to.
Single Value:
*SHARE400: The cartridge identifiers are changed to the *SHARE400 category.
- MNTID
- Specifies the identifier by which the mounted category session will be known. This parameter is valid only when OPTION(*MOUNTED) or OPTION(*ASSIGN) is specified.
*NONE: This mounted category session is not assigned to any job and will be used by the first job that issues a command to the media library with a volume identifier of *MOUNTED. The mount identifier *NONE cannot be specified with OPTION(*ASSIGN).
mount-identifier: Specify a unique name to identify the mounted category session. A mounted category session known by this mount identifier is created and assigned when the category is mounted. This identifier is then used when assigning the session to another job. The session known by this identifier is deleted when the category is demounted. The mount identifier can then be reused when mounting another category to the media library.
Examples for SETTAPCGY
Example 1: Using mounted category without a mount identifier
SETTAPCGY MLB(LIB01) OPTION(*MOUNTED) CGY(*NOSHARE *CURRENT) CTGORDER(*SEQ) TGTCGY(*IPL)This command sets the tape category to *NOSHARE for a resource in media library device LIB01 on the system currently running this command. Each cartridge that is used is changed to the *IPL category. The order in which the cartridges are used is the exact order in which they were added to or changed in the category. As each cartridge is used and unloaded from the resource, the system automatically chooses and loads the next sequential cartridge from the *NOSHARE category.
Example 2: Using mounted category with a mount identifer
This command sets the tape category to *NOSHARE for a resource in media library device LIB01 on the system currently running this command. The mounted category session is identified by the mount identifier DAILY. Each cartridge that is used is changed to the DAILY1 category. The order in which the cartridges are used is the exact order in which they were added to or changed in the category. As each cartridge is used and unloaded from the resource, the system automatically chooses and loads the next sequential cartridge from the *NOSHARE category.
SETTAPCGY MLB(LIB01) OPTION(*RELEASE)This command releases the category session assigned to the job issuing the command. The category is still set to a resource in media library device LIB01 and is available for another job to assign.
SETTAPCGY MLB(LIB01) OPTION(*ASSIGN) MNTID(DAILY)This command assigns the mounted category session identified by the mount identifier DAILY to the job issuing the command.
SETTAPCGY MLB(LIB01) OPTION(*DEMOUNTED)This command demounts the mounted category from a resource in media library device LIB01. The mount identifier DAILY is now available to use to name another mounted category session.
Error messages for SETTAPCGY
*ESCAPE Messages
- CPF6711
- Command not allowed.
- CPF6712
- Category &4 not mounted.
- CPF6713
- Category not demounted.
- CPF6745
- Device &1 not a media library device.
- CPF67A6
- Category does not exist.
- CPF67AD
- Category not assigned.
- CPF67AE
- Category not released.
- CPF67E4
- Library device function not successful.
- CPF9814
- Device &1 not found.
- CPF9825
- Not authorized to device &1.