Read this information to understand the parameters for the Create Tape File (CRTTAPF), Change Tape File (CHGTAPF), and Override with Tape File (OVRTAPF) commands.
The description of the tape device file record is in the application program that uses the tape information. The system views each record as one field with a length equal to the record length.
If some of the file labels are incorrect, specify bypass label processing (*BLP). The system will check each reel for a volume label that begins with the characters VOL1. The system will ignore most other volume label information and the file labels on the tape.
For bypass label processing, each data file on the tape must contain a header label and either an end-of-file trailer label or an end-of-volume trailer label.
The sequence number specified for new standard labeled data files on tape must correspond to the physical sequence number of data files on the tape. (Specify the sequence number by the SEQNBR parameter on the CRTTAPF, CHGTAPF, and OVRTAPF commands.) This means that if files 1 and 2 exist on the tape, the next data file created must have a sequence number of 3. To create a new data file on a tape that contains the last volume of a multivolume-tape data file, the sequence number of the new data file must be the sequence number of the last data file on the multivolume tape data file plus 1. In Figure 1, the sequence number of FILEC must be 3, even though there are only two files on the last volume.
Always specify the location of a data file on tape with the SEQNBR parameter. The information specified on the LABEL parameter verifies that you found the correct data file. However, this verification only occurs after the system locates the file that is specified with the SEQNBR parameter. You cannot locate a data file on tape by label name. If you use the Check Tape (CHKTAP) command, the sequence number of the data file returns in the completion message.
You can use some special values in place of an actual sequence number:
The SEQNBR parameter for an output file for which EXTEND(*NO) is specified must be one of the following values:
The information specified on the LABEL parameter is used for new labels created for an output file for which EXTEND(*NO) is specified. It is also used for an I/O file for which EXTEND(*YES) is specified to verify that the correct file is processed.
The record length, block length, and record block format may not need to be specified for standard-labeled I/O tape data files specified as EXTEND(*YES). The system can take this information from the tape labels. If the program specifies a block length or record block format that does not match tape label specifications in the tape label, the system then assumes the tape label specification.
If the record length specified in the program does not match the length of the data, the system then truncates or pads the data to the length specified in the program
By specifying EXTEND(*YES *CHECK), the system checks the expiration date of the first data file following the data file being extended.
The program might create an output data file instead of extending an existing data file. When this occurs, the system compares the expiration date of the new data file to the date of the file which precedes it on the volume. If the expiration date of the new data file is later than the file preceding it on the tape, the program sends an inquiry message (CPA4036). The system operator can choose one of the following operations:
If you do not want the data file to be written over, specify *PERM on the EXPDATE parameter.
The ENDOPT parameter specifies where to position the magnetic tape when the program closes the tape device file. The program:
When you use a multivolume-tape data file and specify ENDOPT(*LEAVE), you must place the first volume on the first tape device specified in the DEV parameter. (The exception to this is for a read backward, in which case you must place the last volume on the first tape device specified.) If a user opens the data file again, with the same device list, and leaves the tape on a different tape device:
Note the following restriction when using *LEAVE processing with tape media libraries. *LEAVE processing restricts the use of the resource that has the current cartridge mounted to that same cartridge. A resource allocation timeout will occur if both of the following conditions exist:
For additional tape information, and information about using tape for save and restore operations, see the Backup and Recovery topic. Table 1 lists parameters that apply to magnetic tape and shows you where to specify the parameters. The CL topic in the Information Center contains detailed information about how to specify these parameters on the CRTTAPF, CHGTAPF, and OVRTAPF commands.
CL parameter | Description | Specified on CRTTAPF command | Specified on OVRTAPF command | Specified in HLL programs |
---|---|---|---|---|
FILE | File name | Qualified file name | File name | ILE RPG, COBOL, BASIC, PL/I, or ILE C programming languages |
DEV | Device name | *NONE or list of device names | List of device names | |
VOL | Volume | *NONE or list of volume identifiers | *NONE or list of volume identifiers | |
REELS | Volume label type | *SL, *NL, *NS, *BLP, or *LTM | *SL, *NL, *NS, *BLP, or *LTM | |
REELS | Number of labeled tapes | Number of reels | Number of reels | |
SEQNBR | Sequence number | *NEXT, *END, or sequence number of file | *NEXT, *END, or sequence number of file | |
LABEL | Label | *NONE or file label | *NONE or file label | BASIC |
FILETYPE | File type | *DATA or *SRC | ||
RCDLEN | Record length | *CALC or record length | *CALC or record length | ILE RPG, COBOL, BASIC, PL/I, or ILE C programming languages |
BLKLEN | Block length | *CALC or block length | *CALC or block length | COBOL programming language |
BUFOFSET | Buffer offset | *BLKDSC or buffer offset | *BLKDSC or buffer offset | |
RCDBLKFMT | Record block format | *F, *FB, *V, *VB, *D, *DB, *VS, *VBS, or *U | *F, *FB, *V, *VB, *D, *DB, *VS, *VBS, or *U | COBOL, ILE C programming languages |
EXTEND | Extend | *NO, *YES *CHECK, or *YES *NOCHECK | *NO, *YES *CHECK, or *YES *NOCHECK | COBOL, ILE C programming languages |
DENSITY | Density | See the CL topic. | See the CL topic. | |
COMPACT | Data compaction | *DEVD or *NO | *DEVD or *NO | |
CODE | Character code | *EBCDIC or *ASCII | *EBCDIC or *ASCII | COBOL programming language |
CRTDATE | Creation date | *NONE or date | *NONE or date | |
EXPDATE | Expiration date | *NONE, date, or *PERM | *NONE, date, or *PERM | |
ENDOPT | End option | *REWIND, *LEAVE or *UNLOAD | *REWIND, *LEAVE or *UNLOAD | COBOL programming language |
USRLBLPGM | User label program | *NONE or qualified program name | *NONE or qualified program name | |
IGCDTA | Double-byte data | N/A | *NO or *YES | |
WAITFILE | File wait time | *IMMED, *CLS, or number of seconds | *IMMED, *CLS, or number of seconds | |
SHARE | Shared file | *NO or *YES | *NO or *YES | |
AUT | Authority | *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE, or authorization list name | N/A | |
REPLACE | Replace existing file | *YES or *NO | N/A | |
TEXT | Text | *BLANK or text | N/A | |
TBL | Conversion table | N/A | Table name or library, *NONE, *CCSID, *DFT | |
FROMCCSID | From CCSID | N/A | 1 to 65533 | |
TOCCSID | To CCSID | N/A | 1 to 65533 |