Command reference / comm

CRTDEVTAP

Create Device Description (Tape)

The Create Device Description (Tape) (CRTDEVTAP) command creates a device description for a tape device.

Allowed environments: *ALL. Positional parameters: 4.

Restrictions

Parameters

DEVD Device description

Specifies the name of the device description. This is a required parameter.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

TYPE Device type

Specifies the type of device this description represents. Note: When *RSRCNAME is used, the resource name must be an existing tape resource. For a list of the device types that are valid on this parameter, press F4 (Prompt) from the TYPE prompt.

Type
*CHAR
Required
No
Default
*RSRCNAME
Length
50
Case
Uppercase

Suggested / special values: *RSRCNAME

*RSRCNAME
The device type is determined from the resource name (RSRCNAME) parameter.

MODEL Device model

Specifies the model number of the device for this description. Note: This parameter is ignored, but can be specified for compatibility with earlier versions of this command.

Type
*CHAR
Required
No
Default
*RSRCNAME
Length
50
Case
Uppercase

Suggested / special values: *RSRCNAME

*RSRCNAME
The device model is determined from the resource name parameter.
device-model
Specify a device model for this description.

RSRCNAME Resource name

Specifies the resource name that identifies the virtual or physical hardware this description represents. For a physical hardware resource use the WRKHDWRSC command to determine the resource name. Note: The resource name will not be removed if a device description is deleted. You may create a new device description for existing resources by specifying the resource by name.

Type
*NAME
Required
No
Default
*NONE
Length
10
Case
Uppercase

Suggested / special values: *NONE, *VRT

*NONE
No resource name is specified. A resource name must be provided before the device can be varied on.
*VRT
The resource name will be generated by the operating system at the time the device description is created. The resource name will represent virtual (not physical) hardware. Once the IBM i has created the maximum number of virtual hardware resources, the last created resource will be used for the device description.
resource-name
Specify the name to identify the physical or virtual device on the system.

SWTSET Switch setting

Note: This parameter is no longer valid. Specify the RSRCNAME parameter for all tape devices. The SWTSET parameter is provided for compatibility with earlier versions of this command. If specified, the SWTSET parameter is converted to a resource name by the system. Specifies the switch setting for tape devices. For 3422, 3480, and 3490 tape devices the possible values are 0 to F. For 3430 tape devices the possible values are 0 to 3.

Type
*CHAR
Required
No
Length
50
Case
Uppercase

ONLINE Online at IPL

Specifies whether this object is automatically varied on at initial program load (IPL).

Type
*CHAR
Required
No
Default
*YES
Length
50
Case
Uppercase

Allowed values: *NO, *YES

*YES
This device is varied on automatically at IPL.
*NO
This device is not varied on automatically at IPL.

CTL Attached controller

Specifies the name of the controller description to which this device is attached. Note: To use this device for communicating with a remote location that resides on the same system as the local location, specify a controller description that was created with LINKTYPE (*LOCAL) specified. This parameter is not valid when RSRCNAME(*VRT) is specified.

Type
*NAME
Required
No
Length
10
Case
Uppercase

ASSIGN Assign device at vary on

Specifies whether the tape drive is assigned to the system when it is varied on.

Type
*CHAR
Required
No
Default
*YES
Length
50
Case
Uppercase

Allowed values: *NO, *YES

*YES
The tape drive is assigned when the device is varied on.
*NO
The tape drive is not assigned when the device is varied on.

UNLOAD Unload device at vary off

Specifies whether the tape drive is unloaded when the device is varied off.

Type
*CHAR
Required
No
Default
*YES
Length
50
Case
Uppercase

Allowed values: *NO, *YES

*YES
The tape drive is unloaded when the device is varied off.
*NO
The tape drive is not unloaded when the device is varied off. The tape is rewound, but not past the beginning-of-tape marker.

MSGQ Message queue

Specifies the message queue to which operational messages for this device are sent. The possible qualified names are:

Type
*QUAL
Required
No
Default
*SYSOPR
Case
Uppercase

Suggested / special values: *SYSOPR

*SYSOPR
Messages are sent to the QSYSOPR message queue in QSYS.
message-queue-name
Specify the name of the message queue to which operational messages are sent.
*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library to be searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Part 9-01

Type
*NAME
Required
No
Length
10
Case
Uppercase

Part 9-11

Type
*NAME
Required
No
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

TEXT Text 'description'

Specifies the text that briefly describes the object.

Type
*CHAR
Required
No
Default
*BLANK
Length
50
Case
Uppercase

Suggested / special values: *BLANK

*BLANK
No text is specified.
character-value
Specify no more than 50 characters of text, enclosed in apostrophes.

AUT Authority

Specifies the authority you are giving to users who do not have specific authority for the object, who are not on an authorization list, and whose group profile or supplemental group profiles do not have specific authority for the object.

Type
*NAME
Required
No
Default
*CHANGE
Length
10
Case
Uppercase

Suggested / special values: *ALL, *CHANGE, *EXCLUDE, *LIBCRTAUT, *USE

*CHANGE
The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
*ALL
The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
*USE
The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
*EXCLUDE
The user cannot access the object.
*LIBCRTAUT
The system determines the authority for the object by using the value specified for the Create authority (CRTAUT) parameter on the Create Library (CRTLIB) command for the library containing the object to be created. If the value specified for the CRTAUT parameter is changed, the new value will not affect any existing objects.
name
Specify the name of an authorization list to be used for authority to the object. Users included in the authorization list are granted authority to the object as specified in the list. The authorization list must exist when the object is created.

Examples

CRTDEVTAP DEVD(VIRTAP01) RSRCNAME(*VRT)

This command creates a device description for a virtual tape device that is named VIRTAP01. The device type is determined from the resource name. All virtual tape devices will be assigned a TYPE value of 63B0 and MODEL value of 001.

CRTDEVTAP DEVD(TAPDEV01) RSRCNAME(TAPERSRC)

This command creates a device description for a tape device that is named TAPDEV01 with resource TAPERSRC.

IBM command documentation

Generated from os/cl/catalog/CRTDEVTAP.json and os/cl/help/CRTDEVTAP.json.