Duplicate Optical (DUPOPT)

The Duplicate Optical (DUPOPT) command creates a duplicate optical volume. The duplicate volume is identical to the original volume except for the volume identifier and the time it was created.

Restriction: To use this command you must have *USE authority to the authorization list securing the source volume. You need *ALL authority to the authorization list securing the target volume if it is in an optical media library. You need *CHANGE authority to the authorization list securing the target volume if it is in an optical device.

Parameters

Keyword Description Choices Notes
FROMVOL From volume identifier Character value, *MOUNTED Required, Positional 1
TOVOL To volume identifier Character value, *MOUNTED Required, Positional 2
NEWVOL New volume identifier Character value, *TOVOL, *FROMVOL Optional, Positional 3
CLEAR Clear *NO, *YES Optional
FROMDEV From device Name Optional
TODEV To device Name Optional
ALWMEDERR Allow media errors *NONE, *FILE Optional
OUTPUT Output *ERROR, *NONE Optional
FROMENDOPT From end of media option *LEAVE, *UNLOAD Optional
TOENDOPT To end of media option *LEAVE, *UNLOAD Optional

From volume identifier (FROMVOL)

Specifies the volume identifier of the optical volume being duplicated. To determine the volume identifier of media not in an optical media library issue the following Display Optical CL command: DSPOPT VOL(*MOUNTED) DEV(device).

from-volume-identifier
Specify the source volume identifier.
*MOUNTED
Use the optical volume mounted in the optical device specified by the FROMDEV parameter.

Note: This value is not valid for volumes in optical media library devices.

To volume identifier (TOVOL)

Specifies the volume identifier of the optical volume being created (new volume). This volume must have the same physical characteristics as the volume specified on the FROMVOL parameter, but cannot be the volume on the opposite side of the cartridge. If the volume specified is WORM (write-once-read-many) media, it must be a volume that is not initialized. Use the Display Optical (DSPOPT) CL command to determine the physical characteristics of an optical volume.

Note: If the volume access of the TOVOL is Recordable then the volume specified in the FROMVOL parameter must be in a virtual optical device.

to-volume-identifier
Specify the target volume identifier.
*MOUNTED
Use the optical volume mounted in the optical device specified by the TODEV parameter.

Note: This value is not valid for volumes in optical media library devices.

New volume identifier (NEWVOL)

Specifies the new volume identifier of the to-volume after the duplication is complete.

*TOVOL
The volume identifier will be identical to the to-volume identifier.
*FROMVOL
The volume identifier will be identical to the from-volume identifier. This parameter is only allowed for volumes that are not in a library device and either FROMENDOPT or TOENDOPT is *UNLOAD. This is the only valid option if the to-volume media type is *CD-R, *CD-RW, *DVD-R, *DVD+R, *DVD-RW or *DVD+RW.
new-volume-identifier
Specify the new volume identifier of the to-volume.

Clear (CLEAR)

Indicates whether to re-initialize the target optical volume if the volume is found to be already initialized.

Note: This parameter is ignored if the volume is WORM (write-once-read-many), *CD-R, *DVD-R or *DVD+R media.

*NO
The volume is not re-initialized.
*YES
The volume is re-initialized.

Note: For media type *ERASE, specifying *YES will result in all existing data being erased prior to the start of the duplication process.

For media type *DVD-RAM, *RDX, and *DEVICE specifying *YES will not result in existing data being erased prior to the start of the duplication process. Though the data is not erased, access to the data is lost. If it is required that data on *DVD-RAM, *RDX, or *DEVICE media be erased, initialize the volume using Initialize Optical (INZOPT) prior to running DUPOPT. Specify the CLEAR(*YES) parameter on the Initialize Optical (INZOPT) CL command.

For *CD-RW, *DVD-RW, and *DVD+RW, specifying *YES will not result in existing data being erased prior to the duplication process. Though the data is not erased, once the duplication process starts access to the data is lost.

From device (FROMDEV)

Specifies the optical device which contains the from-volume.

Note: This parameter is only required if parameter FROMVOL is specified as *MOUNTED.

from-optical-device
Specify the name of the optical device containing the from-volume.

To device (TODEV)

Specifies the optical device which contains the to-volume.

Note: This parameter is only required if parameter TOVOL is specified as *MOUNTED.

to-optical-device
Specify the name of the optical device containing the to-volume.

Allow media errors (ALWMEDERR)

Specifies whether or not the Duplicate Optical (DUPOPT) command should terminate if an error is encountered while trying to duplicate the file data areas.

Note: This parameter is ignored if the media type is *CD-R, *CD-RW, *DVD-R, *DVD+R, *DVD-RW or *DVD+RW.

*NONE
When an error is encountered duplicating the file data, stop the duplication and return the error.
*FILE
When an error is encountered duplicating the file data, continue the duplication. A list of files not duplicated may be output by specifying OUTPUT(*ERROR).

Output (OUTPUT)

Specifies whether or not the output from the command is printed with the job's spooled output.

Note: This parameter is valid only when *FILE is specified for the Allow media errors (ALWMEDERR) parameter.

*ERROR
If all of the files are duplicated, there is no output. If there are files that were not duplicated, a list of these files will be printed with the job's spooled output. Escape message OPT2047 will also be returned.
*NONE
If all of the files are duplicated, there is no output. If there are files that were not duplicated, the number of files not duplicated will be in the escape message OPT2047.

From end of media option (FROMENDOPT)

After the DUPOPT request has completed, specifies whether to leave or unload the from-volume from the optical device in which it is located.

Note: This parameter is ignored if the from-volume is in an optical media library device.

*LEAVE
The from-volume is left in the optical device.
*UNLOAD
The from-volume is unloaded from the optical device.

To end of media option (TOENDOPT)

After the DUPOPT request has completed, specifies whether to leave or unload the to-volume from the optical device in which it is located.

Note: This parameter is ignored if the to-volume is in an optical media library device.

Note: TOENDOPT(*UNLOAD) must be specified if the to-volume media type is *CD-R, *CD-RW, *DVD-R, *DVD+R, *DVD-RW or *DVD+RW.

*LEAVE
The to-volume is left in the optical device.
*UNLOAD
The to-volume is unloaded from the optical device.

Examples

Example 1: Duplicate an Optical Volume When the Volume Names are Known.

DUPOPT   FROMVOL(VOL01)  TOVOL(VOL02)  NEWVOL(*TOVOL)
         CLEAR(*YES)

This command creates a duplicate of the optical volume VOL01 on volume VOL02, which keeps the same volume identifier. VOL02 will be re-initialized prior to the duplication process.

Example 2: Duplicate an Optical Volume When the Device Names are Known.

DUPOPT   FROMVOL(*MOUNTED)  TOVOL(*MOUNTED)  NEWVOL(BKP001)
         CLEAR(*YES)  FROMDEV(OPT01)  TODEV(OPT02)
         FROMENDOPT(*LEAVE)  TOENDOPT(*UNLOAD)

This command duplicates the optical volume in optical device OPT01 onto the volume in device OPT02. The optical volume in device OPT02 is re-initialized prior to the duplication process. The volume in device OPT01 will be left in the device after the duplication process completes. The volume in device OPT02 will be unloaded after the duplication process completes and will have a volume identifier of BKP001.

Example 3: Duplicate an Optical Volume and Continue the Duplication if Damaged Files are Found.

DUPOPT   FROMVOL(VOL01)  TOVOL(VOL02)  NEWVOL(*TOVOL)
         CLEAR(*YES)  ALWMEDERR(*FILE) OUTPUT(*ERROR)

This command creates a duplicate of the optical volume VOL01 on volume VOL02, which keeps the same volume identifier. VOL02 will be re-initialized prior to the duplication process. If there are any damaged files on VOL01 the duplication will continue and the damaged files will not be duplicated. The names of the damaged files will be printed to the job's spooled output.

Example 4: Duplicate an Exact Copy of a Volume Using NEWVOL(*FROMVOL).

DUPOPT   FROMVOL(VOL01)  TOVOL(VOL02)  NEWVOL(*FROMVOL)
         CLEAR(*YES)  TODEV(OPT02) TOENDOPT(*UNLOAD)

This command creates a duplicate of the optical volume VOL01 on volume VOL02. VOL02 will be re-initialized prior to the duplication process. The volume in device OPT02 will be unloaded after the duplication process completes and will have a volume identifier of VOL01.

Example 5: Duplicate a Virtual Optical Volume to a Recordable optical volume.

DUPOPT   FROMVOL(VIRTVOL)  TOVOL(DVDRW)  NEWVOL(*FROMVOL)
         CLEAR(*YES)  TODEV(OPT02) TOENDOPT(*UNLOAD)

This command creates a duplicate of the optical volume VIRTVOL on volume DVDRW. The volume in device OPT02 will be unloaded after the duplication process completes and will have a volume identifier of VIRTVOL.

Error messages

*ESCAPE Messages

OPT1305
Optical volume &1 is read only.
OPT1315
Optical volume &1 is write protected.
OPT1320
Optical volume &1 in use.
OPT1325
Optical volume format not recognized.
OPT1330
Optical volume not found or not useable.
OPT1331
Optical volume &1 not found.
OPT1335
Volume &1 already initialized.
OPT1337
Operation will result in duplicate volume identifiers.
OPT1338
Operation not supported for library device.
OPT1340
Optical volume &1 not initialized.
OPT1342
Invalid volume identifier specified.
OPT1346
Operation not allowed to volume located in a remote optical device.
OPT1350
Write operation failed to optical volume &1.
OPT1366
Operation failed due to high system activity.
OPT1367
Operation not supported by this device.
OPT1368
Volume &1 is not a virtual volume.
OPT1369
New volume identifier is not valid.
OPT1375
Optical volume &1 already exists.
OPT1460
Optical volume &1 is not in an optical device.
OPT1499
Source and target volumes are in different optical device types.
OPT1515
Unsupported or insufficient configuration on optical device &1.
OPT1530
&1 does not represent a valid optical device.
OPT1555
Optical device &1 in use.
OPT1605
Media or device error occurred.
OPT1790
Operation not allowed or conflicts with another request.
OPT1805
Error accessing optical volume index file.
OPT1810
Error accessing optical directory index file.
OPT1815
Internal program error occurred.
OPT1820
Internal error occurred on optical device &1.
OPT1821
Error occurred on optical device &1.
OPT1825
Optical indexes are incorrect for optical device &1.
OPT1860
Request to optical device &1 failed.
OPT1861
No device description configured for resource &1.
OPT1862
No active device description for resource &1.
OPT1863
Optical libraries need to be reclaimed.
OPT1864
Insufficient allocated and operational optical drives.
OPT1872
Optical request timed out or was cancelled.
OPT2029
TOVOL on opposite side of FROMVOL
OPT2047
Duplicate Optical completed. &3 files were not duplicated.
OPT2050
The duplicate optical volume request from optical volume &1 to optical volume &2 failed.
OPT2301
Internal system object in use.
OPT2420
Not authorized to optical volume &2.
OPT7740
User not authorized to object &2 in library &3 type &4.