Set Tape Category (SETTAPCGY)

The Set Tape Category (SETTAPCGY) command sets the category for a tape device 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.

Parameters

Keyword Description Choices Notes
DEV Library device Name Required, Positional 1
OPTION Option *MOUNTED, *DEMOUNTED, *ASSIGN, *RELEASE Required, Positional 2
CGY Category Single values: *SHARE400
Other values: Element list
Optional
Element 1: Category name Character value, *NOSHARE, *IPL, *NL, *CNV
Element 2: Category system Character value, *CURRENT
CTGORDER Cartridge order *SEQ, *NEXTAVAIL Optional
TGTCGY Target category Single values: *SHARE400
Other values: Element list
Optional
Element 1: Category name Character value, *CGY, *NOSHARE, *IPL, *NL
Element 2: Category system Character value, *CURRENT
MNTID Mount identifier Name, *NONE Optional

Library device (DEV)

Specifies the media library device for which the category is set.

This is a required parameter.

name
Specify the name of the media library device.

Option (OPTION)

Specifies which option is set for the specified media library device.

This is a required parameter.

*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.

Category (CGY)

Specifies the category to be mounted.

Single values

*SHARE400
The cartridge identifier can be shared by other systems that are attached to the library device. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.

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 used from the special convenience category. The cartridge identifiers are mounted in the order specified in the CTGORDER parameter.
character-value
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

The second part of the parameter 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
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.
character-value
Specify the name of the system to which the category belongs.

Cartridge order (CTGORDER)

Specifies the order in which the cartridges are mounted.

*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.

Target category (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 cartridge is automatically changed to the specified target category after it is used.

Single values

*SHARE400
The cartridge identifiers are changed to the *SHARE400 category.

Element 1: 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.
character-value
Specify the name of a user-defined category. The cartridge identifiers are changed to the specified user-defined category.

Element 2: Category system

The second part of this parameter 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 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 system currently running the command is used.
character-value
Specify the name of the system that the category belongs to.

Mount identifier (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).
name
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

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

SETTAPCGY DEV(LIB01) OPTION(*MOUNTED) CGY(*NOSHARE *CURRENT)
          CTGORDER(*SEQ) TGTCGY(DAILY1) MNTID(DAILY)

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.

Example 3: Releasing a Category Session

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.

Example 4: Assigning a Category Session

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.

Example 5: Demounting a Mounted Category

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

*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.