The LABEL parameter specifies the data file identifier of the data file on tape used in input and output operations.
The data file can be in either the exchange format or the save/restore format.
Each data file on tape has its data file identifier stored in its own file label. The data file label (or header label) of each data file is stored on the tape just before the data in the file. That is, each file on the tape has its own header label and its own data records together as a unit, and one file follows another. In addition to the data file identifier, each label also contains other information about the file, such as the file sequence number, record and block attributes, and whether it is a multivolume data file.
Generally, the data file identifier is an alphanumeric character string that contains no more than 8 characters. However, the maximum length actually depends on several things: what data format is used for the files and CL commands in which the identifiers are specified. The unused portion of the file identifier field should be left blank.
The first character of the data file identifier must be alphabetic (A through Z, $, #, or @) and the rest of the characters should be alphanumeric (A through Z, 0 through 9, $, #, _, ., and @). You can use special characters if the identifier is enclosed in apostrophes. However, if the tape is used on a system other than an iSeries™ system, the requirements for specifying identifiers on that system must be considered.
Tape data file identifiers can have as many as 17 characters. However, if a tape is used on a system other than an iSeries system, a maximum of 8 characters, or a qualified identifier of no more than 17 characters, should be used. If more than 8 characters are used, the identifier should be qualified and enclosed in apostrophes so that no more than 8 characters occur in either part, and the parts are separated by a period; for example, LABEL('TAXES.JAN1980'). This limitation applies to the following commands: Create Tape File (CRTTAPF), Change Tape File (CHGTAPF), Override Tape File (OVRTAPF), and Display Tape (DSPTAP).
The data file identifier is put on the volume when the data file is put on the volume. For input/output operations, the identifier can be specified in one of tape device file commands, or it can be passed as a parameter when the device file is opened by the high-level language program that uses the file.
For tapes in the save/restore format, the identifier can have a maximum of 17 characters. If a library name is used to generate the label, the identifier cannot exceed 10 characters. You may specify a label other than a library name.
One of the following values can be specified for the LABEL parameter, depending upon the command.