T-SELECT Command

The T-SELECT command selects one or more tape units and attaches them to your current process. You must have SYS1 privileges to use T-SELECT.

Format

T-SELECT [tapeunit1 [–tapeunit2] | ({P | S})] [(U)] [?]

Parameter(s)

tapeunit1

Number of the logical tape unit. It can be any number between 0 and 7.

tapeunit2

Number of one or more additional tape units chained to tapeunit1. Chained tape units must be assigned to tape drives of the same type and that use the same format. When selecting a set of tape units for chaining together, specify each tape unit, in the order in which you want them chained, separated by hyphens.

{P}

Same as tape unit 0.

{S}

Same as tape unit 1.

U

Unconditionally detaches the tape unit from another process and attaches it to the user’s process. You must have SYS2 privileges to use the U option.

?

Displays a list of all currently selected tape units for the user’s process.

Description

Whenever a user logs on to the system, tape unit 0 is automatically selected by default. It is not, however, attached to the user’s process. The user can select and attach another tape unit, or a set of tape units, by executing the T-SELECT command. These tape units remain selected until the user either logs off or selects another tape unit. They remain attached until the user logs off or detaches them with the T-DET command.

If one of the tape units in a chained set cannot be attached to the user’s process for any reason, none of the specified tape units will be attached, although they will all be selected.

Only a tape unit that has been assigned to a physical tape device, either by default at cold-start or by the SET-TAPE command, can be selected with T-SELECT. If the tape unit is not attached, the following message displays:

[6008] TAPE UNIT NOT ASSIGNED

If the tape unit is attached to another process, the following message displays and the tape unit is selected but not attached to the user’s process:

TAPE DRIVE ATTACHED TO USER # n

 

WARNING

Do not detach a tape drive that is currently being used. This can cause serious problems.

The U option detaches the specified tape unit from whatever process it is currently attached to and attaches the tape unit to the user’s process.

Selecting a Tape Unit

The following two examples show how to select and attach tape unit 0:

>T-SELECT (P)

>T-SELECT 0

The next example detaches tape unit 0 from any process it may be attached to, then selects and attaches it to the user’s process:

>T-SELECT 0 (U)

The next example selects and attaches tape units 0, 2, 3, and 1 (in that order) as a chained set:

>T-SELECT 0-2-3-1

Tape operations using this set will proceed from tape unit 0 to tape unit 2, then to tape unit 3, and finish on tape unit 1. A second set of reels can then be mounted, and operations will return from tape unit 1 to tape unit 0. Tape operations can then proceed, going around the chain again in the same order. Please remember, chained tape units must be assigned to tape drives of the same type and that use the same format.

NOTE

Basic Tape Error Handling does not support O/S controlled tape chaining via the T-SELECT command from TCL since all tape errors, including End of Tape, are passed back to the application program. Passing control to the next tape must be done in the application program.