This statement copies a disk to another disk of the same device type. If OVERWRITE-DISK=*BY-OPERATOR is specified, message FBD1251 is issued, asking for confirmation before the disk is overwritten.
The ACTION operand specifies whether the copy operation is for saving or restoration purposes.
COPY-DISK | Alias: CPD | ||||||||||||||||||||
| |||||||||||||||||||||
DISK = <vsn 1..6>
VSN of the disk to be copied.
FDDRL determines the device type automatically from the VSN. If this is not possible, for example because the disk is not attached, the disk with device type STDDISK is requested.
OVERWRITE-DISK =
Specifies the VSN of the output disk to be mounted. If copying is successful, the output disk is given the VSN of the input disk (original VSN).
OVERWRITE-DISK = *SAME-VSN
The output disk to be mounted has the same VSN as the input disk that was specified under the DISK operand.
OVERWRITE-DISK = <vsn 1..6>
The output disk to be mounted has the specified VSN.
OVERWRITE-DISK = *UNIT(...)
The output disk to be mounted is specified using its mnemonic device name (MN). The operator must confirm the disk assignment. The output disk can be used even if it is not initialized or has the wrong format. In this case it is automatically initialized and formatted in the required format (if this is possible with VOLIN).
UNIT = <alphanum-name 2..2> / <x-text 4..4>
Mnemonic device name (MN) of the output disk.
OVERWRITE-DISK = *BY-OPERATOR
The VSN of the output disk to be mounted is not known to the FDDRL user. The operator is responsible for assigning the correct VSN.
The operand value *BY-OPERATOR should not be used during normal operation, since an operator error may cause foreign disks to be overwritten inadvertently. *BY-OPERATOR is intended exclusively for cases where the VSN is not known. This situation can occur if a previous COPY-DISK, COPY-PUBSET, RELOAD-DISK or RELOAD-PUBSET run was not terminated correctly. In this case, the SVL still contains a dummy VSN which has been assigned by FDDRL (formed from the time of the FDDRL run) and which is designed to prevent BS2000 from working with this disk.
ACTION =
Specifies whether the copy operation is for saving (*SAVE) or restoring (*RESTORE) if the input disk has the same VSN as the output disk. Here it could happen that the operator mistakenly mixes up the two disks, in which case the copy direction would be wrong. The ACTION operand prevents this. FDDRL can use this operand to check the copy direction. Here the time stamps in the SVLs of the two disks are compared. If the disks are found to have been incorrectly assigned, the assignments for the input and output disks are rejected. Operation then continues with the mount request for the input disk.
ACTION = *SAVE
The disk contents are to be saved, i.e. the disk with the earlier time stamp is to be overwritten by the contents of the disk with the more recent time stamp. If the operator assigns an output disk with a more recent time stamp than that of the input disk, the assignment is rejected.
ACTION = *RESTORE
The disk contents are to be restored, i.e. the disk with the more recent time stamp is to be overwritten by the contents of the disk with the earlier time stamp. If the operator assigns an output disk with an earlier time stamp than that of the input disk, the assignment is rejected.