VOL parameter
The volume (VOL) parameter specifies the volume identifiers of the volumes used in a diskette, tape, or optical operation. A diskette volume consists of a single diskette. A tape volume consists of a reel of tape. An optical volume consists of a single side of an optical cartridge or a single CD-ROM. Optical cartridges are dual sided and each side is a separate volume.
The volume identifier is the identifier stored on each diskette, tape, or optical disk (in the volume label area) that it identifies. The diskettes (volumes) must be on the diskette drive in the same order as the identifiers are specified in the VOL parameter. An inquiry message is sent to the system operator if a volume identifier is missing or out of order.
Tape volumes must be on the tape units in the same order as their identifiers are specified in the VOL parameter and as the device names are specified in the DEV parameter of the tape device file commands. However, if the tapes are read backward (a function supported in COBOL), the volumes must be in reverse order to that specified in the VOL parameter. Nevertheless, the device names are still specified in forward order in the DEV parameter.
In general, the rule for specifying diskette and tape volume identifiers is that as many as 6 characters, containing any combination of letters and digits, can be used. Special characters can be used if the identifier is enclosed in apostrophes. However, if the diskette or tape is used on a system other than an iSeries 400, the requirements for specifying identifiers on that system must be considered.
Optical volume identifiers can be up to 32 characters long and can contain any combination of digits and upper case letters. Each optical volume identifier must be unique. No two optical volumes with the same identifier can be present on the system at the same time. A complete list of the rules for optical volume identifiers can be found in the Optical Support book.
For diskettes in the data exchange format and for labeled tapes, the following rules apply:
- Characters: A maximum of 6 characters, or fewer, can be specified for each volume identifier. Alphabetic and numeric characters can be used in any order.
- Uniqueness: More than one volume can have the same identifier. You may have a file using the same identifier for several volumes; in this case, the system keeps track of the order internally with a sequence number written on the volumes. However, volume identifiers should be unique whenever possible.
- Order: When multiple volumes (with different identifiers) are used in a single operation, they must be in the same order as the volume identifiers specified in the VOL parameter.
Multivolume files
For a multivolume file on diskettes (that is, a data file on several diskettes, all having the same name), a message is sent to the system operator for each diskette volume after the first, until all volumes have been processed. If (for S/R only) more than 100 diskettes are used for the same file, duplicate diskette sequence numbers occur for each additional diskette used after the first hundred (01 through 99, and 00). For each 100 diskettes written for the file, a message is sent to the system operator indicating the total number written. When the diskettes are read, the operator must determine the order in which the diskette volumes are inserted.
If multiple volumes (tapes or diskettes) are used in an operation and all have the same volume identifier, that identifier must be specified in the VOL parameter once for each volume used. For example, if three tapes named QGPL are used in a save operation, VOL(QGPL QGPL QGPL) must be specified.
When a multivolume file on tape is processed and multiple tape units are used, the tape volumes must be placed in the tape devices in the same order as they are specified in the VOL parameter. For example, if five volumes and three tape units are used, they are mounted as follows: VOL1 on unit 1, VOL2 on unit 2, VOL3 on unit 3, VOL4 on unit 1, and VOL5 on unit 2.
Values allowed
*MOUNTED: The volume currently placed in the device is used.
*NONE: No volume identifier is specified.
*SAME: Previously specified volume identification does not change.
*SAVVOL: The system, using the save/restore history information, determines which tape or diskette volumes contain the most recently saved version. If the device specified in the DEV parameter of the restore command does not match the device of the most recently saved version of the object, an error message is returned to the user, and the function is ended. If the wrong volume is mounted in the unit specified by the command, a message is returned to the system operator that identifies the first volume that must be placed in the device before the restore operation can begin.
volume-identifier: Specify the identifiers of one or more volumes in the order in which they are put on the device and used. Each tape or diskette volume identifier contains a maximum of 6 alphanumeric characters. Each optical volume identifier contains a maximum of 32 characters. A blank is used as a separator character when listing multiple identifiers.