Create Tape File (CRTTAPF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Create Tape File (CRTTAPF) command creates a tape device file. The device file contains the file description, which identifies the device to be used; it does not contain data. The tape device file is used to read and write records on tape. The same device file can be used for both input and output operations.

Note: This command is not used to create device files for use in save or restore operations. User-created device files are not needed for save or restore operations.

Tape files have no data description specifications (DDS). The information in the tape file description comes from the command that creates it. The tape file has one record format for input/output operations. The record format consists of one character field containing the input data retrieved from the device or the output data to be written to the device. The program using the device file must describe the fields in the record format so the program can arrange the data received from or sent to the device in the manner specified by the tape file description.

Top

Parameters

Keyword Description Choices Notes
FILE File Qualified object name Required, Positional 1
Qualifier 1: File Name
Qualifier 2: Library Name, *CURLIB
DEV Tape device Single values: *NONE
Other values (up to 4 repetitions): Name
Optional
VOL Volume identifier Single values: *NONE
Other values (up to 50 repetitions): Character value
Optional
REELS Tape reels specifications Element list Optional
Element 1: Label processing type *SL, *NL, *NS, *BLP, *LTM
Element 2: Number of reels 1-255, 1
SEQNBR Sequence number 1-16777215, 1, *END, *NEXT Optional
LABEL Tape label Character value, *NONE Optional
FILETYPE File type *DATA, *SRC Optional
IGCDTA User specified DBCS data *NO, *YES Optional
TEXT Text 'description' Character value, *BLANK Optional
RCDLEN Record length Integer, *CALC Optional
BLKLEN Block length 1-524288, *CALC Optional
BUFOFSET Buffer offset Integer, 0, *BLKDSC Optional
RCDBLKFMT Record block format *FB, *F, *V, *VB, *D, *DB, *VS, *VBS, *U Optional
EXTEND Extend Single values: *NO
Other values: Element list
Optional
Element 1: Extend file *YES
Element 2: Check file *NOCHECK, *CHECK
DENSITY Tape density Character value, *DEVTYPE, *CTGTYPE, *FMT3480, *FMT3490E, *FMT3570, *FMT3570E, *FMT3590, *FMT3590E, *QIC120, *QIC525, *QIC1000, *QIC2GB, *QIC2DC, *QIC4GB, *QIC4DC, *QIC3040, *QIC5010, *MLR3, *SLR60, *SLR100, *FMT2GB, *FMT5GB, *FMT7GB, *FMT20GB, *FMT60GB, *ULTRIUM1, 1600, 3200, 6250 Optional
COMPACT Data compaction *DEVD, *NO Optional
CODE Code *EBCDIC, *ASCII Optional
CRTDATE Creation date Date, *NONE Optional
EXPDATE File expiration date Date, *NONE, *PERM Optional
ENDOPT End of tape option *REWIND, *LEAVE, *UNLOAD Optional
USRLBLPGM User label program Single values: *NONE
Other values: Qualified object name
Optional
Qualifier 1: User label program Name
Qualifier 2: Library Name, *LIBL, *CURLIB
WAITFILE Maximum file wait time Integer, *IMMED, *CLS Optional
SHARE Share open data path *NO, *YES Optional
AUT Authority Name, *LIBCRTAUT, *ALL, *CHANGE, *EXCLUDE, *USE Optional
REPLACE Replace file *YES, *NO Optional
Top

File (FILE)

Specifies the tape device file to be created.

If the file is used by a high-level language program, the file name must be consistent with the naming rules of that language. Otherwise, the file must be renamed in the program itself.

This is a required parameter.

Qualifier 1: File

name
Specify the name of the tape device file to be created.

Qualifier 2: Library

*CURLIB
The current library for the job is used to locate the tape device file. If no library is specified as the current library for the job, QGPL is used.
name
Specify the library where the tape file is located.
Top

Device (DEV)

Specifies the names of one or more tape devices, one virtual tape device, or one media library device used with this tape device file to perform reading and writing data operations. A media library device is a tape storage device that contains one or more tape drives, tape cartridges, and a part (carriage and picker assembly) for moving tape media between the cartridge storage slots and the tape drives.

Single values

*NONE
No device names are specified. They must be specified later in the Change Tape File (CHGTAPF) or Override Tape File (OVRTAPF) command, or in the high-level language program that opens the file.

Other values

name
Specify the names of no more than four tape devices, one virtual tape device, or the name of one media library device used with this tape device file. The order in which the device names are specified here is the order in which tapes on those devices are processed. When the number of volumes being processed exceeds the number of devices listed on this parameter, the devices are used in the same order as specified, wrapping around to the first device as needed.
Top

Volume identifier (VOL)

Specifies one or more volume identifiers used by the file. The volumes must be installed in the same order as the identifiers are specified here (and as they are specified for the DEV parameter. If the file is opened for read backward, then the volume identifiers in the list are processed from last to first (while the devices in the device list are used in first-to-last order). If a list of volume identifiers is provided for the file, operator messages indicate the name of the required volume.

Single values

*NONE
No tape volume identifiers are specified for this file. They can be supplied before the device file is opened, either in a CHGTAPF or OVRTAPF command or in the high-level language program. If volume identifiers are not specified before the device file is opened, volume checking is not performed beyond verifying that the correct label type volume is on the device, and volume names are not provided in operator messages. The maximum number of reels processed for an *NL, *NS, *BLP, or *LTM input file when VOL(*NONE) is specified is determined by the REELS(number-of-reels) parameter value.

Other values (up to 50 repetitions)

character-value
Specify the identifiers of one or more volumes in the order in which they are placed on the device. Each volume identifier contains a maximum of 6 alphanumeric characters. Use a blank as a separator character when listing multiple identifiers. Up to 50 volume identifiers can be specified. These identifiers are used in messages sent to the operator during processing. The maximum number of reels processed for an *NL, *NS, *BLP, or *LTM input file is determined by the number of volume identifiers in the list.

Note: If the VOL parameter value used for the file specifies a list of identifiers rather than VOL(*NONE), the number-of-reels part of the REELS parameter is ignored regardless of where it is specified. A description of how the parameter values for the file are determined when overrides are used, the high-level language interface, and the device file when the file is opened is in the Files and file systems topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter. To ensure that the number-of-reels part of the REELS parameter is used (rather than a VOL identifier list) to control the volumes processed by the tape device file, specify VOL(*NONE) in the same command in which the REELS parameter is specified.

Top

Tape reels specifications (REELS)

Specifies the type of labeling used on the tape reels and the maximum number of reels processed if both a list of volume identifiers is not specified (VOL parameter) and this device file is used with either *NL, *NS, *LTM, or *BLP input files. When the number of reels is specified as the second element of this parameter, the volume identifiers on the volumes are ignored if labeled tapes are being processed; instead, the order in which the reels are installed on the device must be checked by the operator.

The number-of-reels value is not a limiting value for standard-label or output files. For a standard-label input file, the data file labels limit the number of volumes processed by indicating end-of-file. For an output file, the number-of-reels value is ignored; the system requests that additional volumes be kept on the device until the file is closed.

The system checks the first record following the load point on the tape to see (1) whether it has exactly 80 bytes for EBCDIC or at least 80 bytes for ASCII and (2) whether the first 4 bytes contain the values VOL and 1. If so, the reel contains a standard-label tape. *SL and *BLP files require standard-label tape volumes. *NL, *NS, and *LTM tape files cannot process standard-label volumes.

Note: The values *SL, *NL, and *LTM can be specified if the device file is used for either reading or writing on tapes. The values *NS and *BLP are valid only if the device file is used to read tapes.

Element 1: Label processing type

*SL
The volumes have standard labels. If a list of volume identifiers is specified (with the VOL parameter), the system checks that the correct tape volumes are on the device in the specified sequence.
  • If no volume identifier list is given and the file is opened for output, any standard-label volumes may be installed on the device.
  • If no volume identifier list is given and the file is opened for input, the first volume may have any volume identifier, but if the file is continued, the system requires the correct continuation volumes to be processed (verified by checking the data file labels). For an input file, the end-of-file message is sent to the program being used when the labels on the last volume processed indicate that it is the last volume for the data file.
*NL
The volumes are not labeled. On a nonlabeled volume, tape marks are used to indicate the end of each data file and the end of the volume. For an input file, the end-of-file message is sent to the program when the number of volumes specified in the volume list have been processed, or, if no list of volume identifiers is provided, when the number of reels specified in the REELS parameter are processed.
*NS
The volumes have nonstandard labels. Each volume must start with some kind of label information, optionally preceded by a tape marker and always followed by a tape marker. This nonstandard label information is ignored. The system spaces forward to a point beyond the tape marker that follows the nonstandard labels and positions the tape at the file's data. Each reel must have a tape marker at the end of the file's data. Information beyond this ending tape marker is ignored. Only a single data file can exist on a nonstandard tape. Standard-label volumes cannot be processed by using the *NS label processing.

For an input file, the end-of-file message is sent to the program using the file when the number of volumes specified in the volume list have been processed, or, if no list of volume identifiers is provided, when the number of reels specified in the REELS parameter are processed.

*BLP.
Standard-label processing is bypassed. Each reel must have standard labels. Although each reel is checked for a standard volume label and each file must have at least one standard header label (HDR1) and one standard trailer label (EOV1 or EOF1), most other label information (such as the data file record length or block length) is ignored. The sequence number of each file on the volume is determined only by the number of tape markers between it and the start of tape (in contrast to *SL processing in which the file sequence number stored in the header and trailer labels of each file are used to locate a data file).

Most of the information in the data file trailer label is ignored, but if an end-of-file (EOF) trailer label is found, the end-of-file message is sent to the program using the tape file. If no end-of-file trailer label is encountered by the time the specified number of volumes or reels have been processed (volume identifier list and REELS parameter), the end-of-file message is immediately sent to the program using the tape file. Bypass label processing can be used when the user does not know the name of the file used or when some file label information is incorrect.

*LTM
The volumes have no labels but do have a single leading tape marker before the first data file. REELS(*LTM) is processed the same as REELS(*NL) except that when SEQNBR(1) is specified for an output file to create the first data file on the tape, a leading tape marker is written at the start of the tape before the first data block.

Element 2: Number of reels

1
Only one tape reel is processed for the *NL, *LTM, *NS, or *BLP tape file input operation if no list of volume identifiers is provided (VOL parameter).
1-255
Specify the maximum number of reels to be processed for an *NL, *LTM, *NS, or *BLP input tape operation when a list of volume identifiers is not specified (VOL parameter). If the next reel is not on the device when the end of the currently-processing tape is reached, a message is sent to the operator requesting that the next tape be installed on the next tape device. The number-of-reels value is ignored for a standard-label (*SL) file or for any output file.
Top

Sequence number (SEQNBR)

Specifies the sequence number of the data file on the tape being processed.

1
For standard-label tapes (not using bypass label processing), the data file having the sequence number 1 is processed. For nonlabeled tapes and for bypass label processing of standard-label tapes, the first data file on the tape is processed.
*END
The file is written on the end of the tape. This value is used only for files that are written to tape.

An error message is shown on the display when a tape device file is used to read from a tape and the *END special value is specified in the tape device file.

*NEXT
The next file in the sequence is processed. This value is used for files read from tape. If the tape is currently in a position that is prior to the first file, the first file on the tape is processed.

An error message is shown on the display when a tape file is used to write to a tape and the *NEXT special value is specified in the tape file.

1-16777215
Specify the sequence number of the file.
Top

Tape label (LABEL)

Specifies the data file identifier of the data file processed by this tape device file. An identifier is defined only for standard-label tapes and is stored in the header label immediately before the data file.

If a data file identifier is specified for any type of label processing other than *SL, it is ignored.

An identifier is required for a standard label output file, but is optional for an input file because the sequence number uniquely identifies the data file to process.

For an input file or output file with EXTEND(*YES) specified, this parameter specifies the identifier of the data file on the tape. The specified identifier must match the one in the labels of the data file that the SEQNBR parameter specifies; otherwise, an error message is sent to the program using this device file. For output files with EXTEND(*NO) specified, this parameter specifies the identifier of the data file to be created on the tape.

*NONE
The data file identifier is not specified.
character-value
Specify the identifier (17 alphanumeric characters maximum) of the data file used with this tape device file. If this identifier is for a tape written in the basic exchange format, and is used on a system other than an iSeries system, up to eight characters or a qualified identifier having no more than eight characters per qualifier must be used.
Top

File type (FILETYPE)

Specifies whether the tape device file being created describes data records or source records (statements) for a program or for another file.

*DATA
The tape file describes data records.
*SRC
The tape file describes source records.

Note: If *SRC is specified, the system adds 12 bytes to the start of every record to replace the source sequence number and date fields.

Top

User specified DBCS data (IGCDTA)

Specifies, for program-described files, whether the file processes double-byte character set (DBCS) data. Specifies, for externally described files, the DBCS attributes of the file.

*NO
The file does not process double-byte character set (DBCS) data.
*YES
The file processes double-byte character set (DBCS) data.
Top

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

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

Record length (RCDLEN)

Specifies, in bytes, the length of the records contained in the data file processed with this device file. The system always uses the record length and block length specified in the data file labels for any standard-label input file or output file with EXTEND(*YES) specified (if a second header label (HDR2) is found on the tape and *BLP label processing has not been specified).

*CALC
No record length is specified for the data file being processed. If *CALC is specified, the system will attempt to calculate an appropriate record length when the file is opened. RCDLEN(*CALC) can be used for nonlabeled tapes or when there is no HDR2 label if a BLKLEN value other than *CALC is specified for the file and RCDBLKFMT does not specify spanned or blocked records. In this case, the system calculates an appropriate record length from the block length, record block format, and buffer offset (for an ASCII file) specified for the file. In any other case, the actual record length must be specified by a CHGTAPF command or OVRTAPF command, or in the high-level language program that opens the device file. The system attempts to calculate an appropriate record length when the file is opened.
integer
Specify the length of each record in the data file. Valid values range from 1 through 32767 bytes.
Figure: EBCDIC RCDLEN Ranges

RCDFBLKFMT     FILETYPE(*DATA)   FILETYPE(*SRC)
----------     ---------------   --------------
*F *FB *U      18 - 32767        30 - 32767
*V *VB         1 - 32759         13 - 32767
*VS *VBS       1 - 32759         13 - 32767

Figure: ASCII RCDLEN Ranges

RCDFBLKFMT     FILETYPE(*DATA)   FILETYPE(*SRC)
----------     ---------------   --------------
*F *FB *U      18 - 32767        30 - 32767
*D *DB         1 - 9995          13 - 10007
*VS *VBS       1 - 32759         13 - 32767

Top

Block length (BLKLEN)

Specifies the number of bytes in the maximum length of the data blocks being transferred to or from the tape for reading or writing operations.

*CALC
No block length is specified for the data file being processed. The system attempts to calculate an appropriate block length when the file is opened.
1-524288
Specify the maximum length of each block in the data file to be processed. The minimum block length that can be successfully processing is determined by the tape device hardware and iSeries system machine support functions.

The maximum block length is always 524288 bytes for an input file, but is limited to 9999 bytes if block descriptors must be created for an ASCII output file.

The following table shows the minimum and maximum block length values allowed for an output file:

Figure: Minimum and Maximum BLKLEN Values

CODE        BUFOFSET    MIN BLKLEN   MAX BLKLEN
--------    --------    ----------   ----------
*EBCDIC     Ignored         18         524288
*ASCII      0               18         524288
*ASCII      *BLKDSC         18         9999

Top

Buffer offset (BUFOFSET)

Specifies the buffer offset value for the start of the first record in each block in the tape data file. A buffer offset value can be used for any record block format ASCII file, and is ignored for an EBCDIC tape file. The system uses the buffer offset specified in the data file labels for any standard-label input file or output file with EXTEND(*YES) specified if a value is contained in the second header label (HDR2) on the tape, and *BLP label processing has not been specified.

The buffer offset parameter specifies the length of any information that precedes the first record in the block. For record block formats *D, *DB, *VS, and *VBS, each record or record segment is preceded by a descriptor that contains the length of the record or segment. A buffer offset value is used to indicate that there is information ahead of the descriptor word for the first record in each block, or ahead of the data of the first fixed-length record or undefined format record in each block.

This parameter is not needed for a standard-label file processed for input if the tape includes a second file header label (HDR2) that contains the buffer offset value. A buffer offset value must be provided by the Create Tape File (CRTTAPF) command, Change Tape File (CHGTAPF) command, or Override Tape File (OVRTAPF) command, or by the file labels for an input file that contains any information (such as a block descriptor) ahead of the first record in each block. If the user does not specify a buffer offset value when a tape file is created, it is not necessary to specify an offset value when the file is read.

The only buffer offset values allowed for an output file are zero and *BLKDSC. An existing standard-label data file with a buffer offset value in the HDR2 label can be extended only if the buffer offset value is either 0 or 4. A buffer offset value of 0 in the HDR2 label adds data blocks with no buffer offset. BUFOFSET(*BLKDSC) must be specified to extend an existing tape data file that contains an offset value of 4 in the HDR2 label.

0
No buffer offset information precedes the first record in each data block.
*BLKDSC
4-byte block descriptors are created in any tape file created by using this device file. Any input file read by using this device file assumes 4-bytes of buffer offset information preceding the first record in each data block. This value is valid only if *D or *DB is specified for the Record block format (RCDBLKFMT) parameter.
integer
Specify the length (in bytes) of the buffer offset information that precedes the first record in each data block. Valid values range from 0 through 99 bytes.
Top

Record block format (RCDBLKFMT)

Specifies the type and blocking attribute of records in the tape data file being processed.

Record block format *V and *VB records can be processed only for an EBCDIC file; *D and *DB records can be processed only for an ASCII file. If a standard-label tape (label type *SL or *BLP) is being processed and an inconsistent record block format is specified for the volume code, the correct record type is assumed (V or D) for the volume code and a warning message is sent to the program that opens the file. If the record type and code are inconsistent for a nonlabeled volume (label type *NL, *LTM, or *NS), an error message is sent and the file is not opened, because there are no labels to verify the correct volume code.

If a valid record length, block length, and buffer offset value (for an ASCII file) are specified for fixed-length records but the block attribute is incorrect, the correct block attribute is assumed (changing record block format *F to *FB or record block format *FB to *F), and a warning message is sent to the program that opens the file.

If a block length is specified that is longer than required to process a maximum length record, then record block format *V, *D, or *VS is changed to *VB, *DB, or *VBS and a warning message is sent to the program that opens the file.

Note: When BUFOFSET(*BLKDSC) is specified for the file, a value of 4 should be used for the BUFOFSET part of any BLKLEN calculations, unless existing file labels on the tape specify a different value.

*FB
Fixed length, blocked, unspanned records in either EBCDIC or ASCII code are processed.
*F
Fixed length, deblocked, unspanned records in either EBCDIC or ASCII code are processed.
*V
Variable length, deblocked, unspanned records in EBCDIC type V format are processed.
*VB
Variable length, blocked, unspanned records in EBCDIC type V format are processed.
*D
Variable length, deblocked, unspanned records in ASCII type D format are processed.
*DB
Variable length, blocked, unspanned records in ASCII type D format are processed.
*VS
Variable length, deblocked, spanned records in either EBCDIC or ASCII code are processed.
*VBS
Variable length, blocked, spanned records in either EBCDIC or ASCII code are processed. The representation of spanned records on the tape is different for EBCDIC and ASCII files, but the system selects the correct format based on the file code.
*U
Undefined format records in either EBCDIC or ASCII code are processed.
Figure: Required RCDLEN/BLKLEN/BUFOFSET Relation

CODE         RCDBLKFMT    BLKLEN1
==========   =========    ===================
*EBCDIC      *F *U        = RCDLEN
*ASCII       *F *U        = RCDLEN + BUFOFSET
----------   ---------    --------------------
*EBCDIC      *FB          = RCDLEN * n
*ASCII       *FB          = (RCDLEN * n) + BUFOFSET
                          (where n is the number
                           of records in a
                           maximum-length block)
----------   ---------    --------------------
*EBCDIC      *V           = RCDLEN * 8
*ASCII       *D           = RCDLEN * 4 + BUFOFSET
----------   ---------    --------------------
*EBCDIC      *VB          >= RCDLEN + 8
*ASCII       *DB          >= RCDLEN + 4 + BUFOFSET
----------   ---------    --------------------
*EBCDIC      *VS *VBS     >= 18
*ASCII       *BS *VBS     >= 6 + BUFOFSET (18 minimum)
----------   ---------    --------------------
NOTE: Block length (BLKLEN) is a function of
record length (RCDLEN) and buffer offset (BUFOFSET).

Top

Extend file (EXTEND)

Specifies, for output operations to tape, whether new records are added to the end of a data file that is currently on the tape. If the data file is extended, it becomes the last file on the tape volume.

Note: This parameter is not valid for 1/4-inch cartridge tape devices.

Single values

*NO
Records are not added to the end of the specified data file.

Element 1: Extend file

*YES
New records are added to the end of the specified data file on tape when this device file is used.

Element 2: Check file

*NOCHECK
The file is extended without being checked to determine whether it is active.
*CHECK
Before the file is extended, it is checked to determine whether it is active.
Top

Tape density (DENSITY)

Specifies the density of the data that is written on the tape volume when this device file is created. This parameter is used only for tape files being written to tape; it is ignored for tape files being read from the tape (in the case of files being read from tape, the density on the tape is used).

The density of a standard-label volume is specified on the INZTAP command, which initializes tapes as standard-label volumes by writing volume labels on them. If the density specified for this parameter is different than the density of a standard-labeled tape, the tape must be reinitialized to the specified density.

*DEVTYPE
The highest capacity density or format supported by the tape device will be used.
Device
Highest capacity density or format
3480
*FMT3480
3490E
*FMT3490E
3570-Bxx
*FMT3570
3570-Cxx
*FMT3570E
3580-001
*ULTRIUM1
3580-002
*ULTRIUM2
3580-003
*ULTRIUM3
3590-Bxx
*FMT3590
3590-Exx
*FMT3590E
3590-Hxx
*FMT3590H
3592-J1A
*FMT3592A1
4685-001
*VXA2
6335
*QIC3040
6343
*QIC1000
6344
*QIC2GB
6348
*QIC1000
6349
*QIC2GB
6368
*QIC1000
6369
*QIC2GB
6379
*QIC1000
6380
*QIC2GB
6381
*QIC2DC
6382
*QIC4DC
6383
*QIC5010
6384
*SLR60
6385
*QIC5010
6386
*MLR3
6387
*SLR100
6390
*FMT7GB
63B0
*VRT256K
7207-122
*QIC4DC
7208-002
*FMT2GB
7208-012
*FMT5GB
7208-222
*FMT7GB
7208-342
*FMT20GB
7208-345
*FMT60GB
9348
6250
*CTGTYPE
The highest capacity density or format supported by the device for the mounted cartridge type will be used. If the device does not support special cartridge type information, *DEVTYPE is used.
character-value
Specify the density or format to use.
1600
The data density on the tape volume is 1,600 bits per inch, which is used for 1/2 inch reel tapes.
3200
The data density on the tape volume is 3,200 bits per inch, which is used for 1/2 inch reel tapes.
6250
The data density on the tape volume is 6,250 bits per inch, which is used for 1/2 inch reel tapes.
*FMT3480
The format of this tape is FMT3480. The data density on this tape volume is formatted to support a 3480 device. This density is used for 1/2 inch cartridge tapes.
*FMT3490E
The format of this tape is FMT3490E. The data density on this tape volume is formatted to support a 3490E device. This density is used for 1/2 inch cartridge tapes.
*FMT3570
The format of this tape is FMT3570. The data format is written on the tape volume with a 3570 device.
*FMT3570E
The format of this tape is FMT3570E. The data format is written on the tape volume with a 3570E device.
*FMT3590
The format of this tape is FMT3590. The data format is written on the tape volume with a 3590 device. This density is used for 1/2 inch cartridge tapes.
*FMT3590E
The format of this tape is FMT3590E. The data format is written on the tape volume with a 3590E device. This density is used for 1/2 inch cartridge tapes.
*FMT3590H
The format of this tape is FMT3590H. The data format is written on the tape volume with a 3590H device. This density is used for 1/2 inch cartridge tapes.
*FMT3592A1
The format of this tape is FMT3592A1. The data format is written on the tape volume with a 3592 device. This density is used for 1/2 inch cartridge tapes.
*QIC120
The format of this tape is QIC120, which is used for 1/4 inch cartridge tapes that can hold 120 megabytes of data.
*QIC525
The format of this tape is QIC525, which is used for 1/4 inch cartridge tapes that can hold 525 megabytes of data.
*QIC1000
The format of this tape is QIC1000, which is used for 1/4 inch cartridge tapes that can hold 1200 megabytes of data.
*QIC2GB
The format of this tape is QIC2GB. It is used by 1/4 inch tape devices which can store 2.5 gigabytes of data on a standard length QIC2GB cartridge.
*QIC2DC
The format of this tape is QIC2DC. It is used to write compacted data to a 1/4 inch cartridge that supports the QIC2GB format.
*QIC4GB
The format of this tape is QIC4GB. It is used by 1/4 inch tape devices which can store 4 gigabytes of data on a standard length QIC4GB cartridge.
*QIC4DC
The format of this tape is QIC4DC. It is used to write compacted data to a 1/4 inch cartridge that supports the QIC4GB format.
*QIC3040
The format of this tape is QIC3040, which is used for 1/4 inch minicartridge tapes that can hold 840 megabytes of data.
*QIC5010
The format of this tape is QIC5010, which is used for 1/4 inch cartridge tapes that can hold 13.5 gigabytes of data.
*MLR3
The format of this tape is MLR3. It is used by 1/4 inch tape devices which can store 25 gigabytes of data on a standard length MLR3 cartridge.
*SLR60
The format of this tape is SLR60. It is used by 1/4 inch tape devices which can typically store 60 gigabytes of compacted data on a standard length SLR60 cartridge.
*SLR100
The format of this tape is SLR100. It is used by 1/4 inch tape devices which can typically store 100 gigabytes of compacted data on a standard length SLR100 cartridge.
*FMT2GB
The format of this tape is FMT2GB, which is used for 8 millimeter cartridge tapes that can hold 2 gigabytes of data.
*FMT5GB
The format of this tape is FMT5GB, which is used for 8 millimeter cartridge tapes that can hold 5 gigabytes of data.
*FMT7GB
The format of this tape is FMT7GB, which is used for 8 millimeter cartridge tapes that can hold 7 gigabytes of data.
*FMT20GB
The format of this tape is FMT20GB. It is used by 8 millimeter tape devices that can store 20 gigabytes of data on a standard length cartridge.
*FMT60GB
The format of this tape is FMT60GB. It is used by 8 millimeter tape devices that can store 60 gigabytes of data on a standard length cartridge.
*ULTRIUM1
The format of this tape is ULTRIUM1. It is used by 1/2 inch cartridge tape devices that can store 100 gigabytes of data on a standard length cartridge.
*ULTRIUM2
The format of this tape is ULTRIUM2. It is used by 1/2 inch cartridge tape devices that can store 200 gigabytes of data on a standard length cartridge.
*ULTRIUM3
The format of this tape is ULTRIUM3. It is used by 1/2 inch cartridge tape devices that can store 400 gigabytes of data on a standard length cartridge.
*VRT32K
The format of the volume is VRT32K. It is used to write data to a virtual volume using a maximum data block size of 32KB. Volumes written using this format can be duplicated to all supported tape devices.
*VRT64K
The format of the volume is VRT64K. It is used to write data to a virtual volume using a maximum data block size of 64KB. Volumes written using this format can only be duplicated to tape devices that support a maximum block size of 64KB or greater.
*VRT240K
The format of the volume is VRT240K. It is used to write data to a virtual volume using a maximum data block size of 240KB. Volumes written using this format can only be duplicated to tape devices that support a maximum block size of 240KB or greater.
*VRT256K
The format of the volume is VRT256K. It is used to write data to a virtual volume using a maximum data block size of 256KB. Volumes written using this format can only be duplicated to tape devices that support a maximum block size of 256KB or greater.
*VXA1
The format of this tape is VXA1. It is used by VXA cartridge tape devices that can store 33 gigabytes of data on a standard length cartridge.
*VXA2
The format of this tape is VXA2. It is used by VXA cartridge tape devices that can store 80 gigabytes of data on a standard length cartridge.

Note: Self-configured tape devices may define additional valid values for the density parameter. Use iSeries Navigator (Configuration and Service) (Hardware) (Tape Devices) (Tape Libraries) (Tape Resources) (Properties) or (Configuration and Service)(Hardware) (Tape Devices) (Stand-Alone Devices) (Properties) to find additional valid density values for a specific device, or use the F4=Prompt key on the "Tape density" field of the CL command to see a list of all valid density values for the attached tape devices.

Top

Data compaction (COMPACT)

Specifies whether device data compaction is performed. If the tape devices being used do not support data compaction, this parameter will be ignored when the file is opened.

*DEVD
Device data compaction is performed if the devices being used support data compaction.
*NO
Device data compaction is not performed.
Top

Code (CODE)

Specifies the type of character code used when tape data is read or written by a job that uses this tape device file.

*EBCDIC
The EBCDIC character code is used with this tape device file.
*ASCII
The ASCII character code is used.
Top

Creation date (CRTDATE)

Specifies the date when the data file was created on (written to) tape. The data file creation date is stored in file labels on the tape. If a creation date is specified for any type of label processing other than *SL, it is ignored.

*NONE
The creation date is not specified.
date
Specify the creation date of the data file used by this tape device file.
Top

File expiration date (EXPDATE)

Specifies, for tape output data files only, the expiration date of the data file used by this device file. The data file expiration date is stored in file labels on the tape. If an expiration date is specified for any type of label processing other than *SL, it is ignored. The data file is protected and cannot be written over until the specified expiration date.

*NONE
No expiration date is specified for the data file. The data file is not protected.
*PERM
The data file is protected permanently. The date written on the tape is 999999.
date
Specify the date on which and after which the data file is no longer protected.
Top

End of tape option (ENDOPT)

Specifies the positioning operation performed automatically on the tape volume when the tape device file is closed. In the case of a multiple-volume data file, this parameter applies only to the last reel.

*REWIND
The tape is automatically rewound, but not unloaded, after the operation has ended.
*UNLOAD
The tape is automatically rewound and unloaded after the operation ends.
*LEAVE
The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.

Note: Even if *LEAVE is specified for the ENDOPT parameter, the next tape file opened to this reel is positioned at the start or end of a data file when it is opened.

Top

User label program (USRLBLPGM)

Specifies the user program that processes user-defined tape labels. On an output file, the user label program passes the user labels that are written to tape. On an input file, the user labels are passed to the user label program.

Single values

*NONE
There is no user label program for this device file.

Qualifier 1: User label program

name
Specify the name of the user program that processes the user tape labels.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
name
Specify the name of the library to be searched.
Top

Maximum file wait time (WAITFILE)

Specifies the number of seconds that the program waits for the file resources to be allocated when the file is opened, or the device or session resources to be allocated when an acquire operation is performed to the file. If the file resources cannot be allocated in the specified wait time, an error message is sent to the program.

*IMMED
The program does not wait. Immediate allocation of file resources is required.
*CLS
The job default wait time is used as the wait time for the file resources to be allocated.
1-32767
Specify the number of seconds to wait for file resources to be allocated.
Top

Share open data path (SHARE)

Specifies whether the open data path (ODP) is shared with other programs in the same routing step. When an ODP is shared, the programs accessing the file share facilities such as the file status and the buffer.

*NO
The ODP is not shared with other programs in the routing step. A new ODP for the file is created and used every time a program opens the file.
*YES
The same ODP is shared with each program in the job that also specifies *YES when it opens the file.
Top

Authority (AUT)

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.

*LIBCRTAUT
The system determines the authority for the object by using the value specified for the Create authority (CRTAUT) parameter on the Create Library command (CRTLIB) 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.
*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.
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.
Top

Replace file (REPLACE)

Specifies whether an existing file, other than a save or database file, is replaced.

*YES
An file is replaced if the creation of the new tape device file with the same name and library is successful.
*NO
The creation of a new tape device file is not allowed if there is an existing file with the same name and library.
Top

Examples

Example 1: Creating a Description of a Tape Device File

CRTTAPF   FILE(BACKHST)  DEV(QTAPE1 QTAPE2 QTAPE3)
          REELS(*BLP 10)  RCDLEN(256)  BLKLEN(1024)
          RCDBLKFMT(*FB)  EXTEND(*YES)
          ENDOPT(*UNLOAD)  WAITFILE(60)

This command creates a description of the tape device file named BACKHST in the current library, to be used with the tape devices QTAPE1, QTAPE2, and QTAPE3. All volumes processed on these devices with this device file must have standard-labels. Each block of data (EBCDIC character code) on the tape volumes contains four records of 256 bytes each. When records are written to the tape, they are added to the end of the data file. No creation or expiration date is specified for this tape, and both unloading and rewinding operations will occur when the device file is closed at the last tape volume processed. The program using this tape device file waits 60 seconds for file resources to be allocated when this file is opened, and this device file is used only when the current program is running.

Example 2: Creating a Tape File Containing DBCS Data

CRTTAPF   FILE(IGCLIB/IGCTAP)  LABEL(GENINF)  IGCDTA(*YES)

This command creates the tape file IGCTAP that is stored in library IGCLIB, which is labeled GENINF, and contains DBCS data.

Top

Error messages

*ESCAPE Messages

CPF7302
File &1 not created in library &2.
Top