DUPTAP (Duplicate Tape)
Purpose
The Duplicate Tape (DUPTAP) command copies the contents of one tape to another tape.
Notes
- The density field in the file header labels is updated to reflect the true density.
- Byte 80 in the volume label of a tape written on device type 6157 is reset from a 'Q' to a blank.
Restrictions
- The user must have two tape drives or a tape media library device with two tape resources to use this command.
- A file that spans volumes must have both partial files duplicated at the same time. That is, duplicating a tape that ends in a partial file, followed by appending the second part of the file to the end of the tape is not allowed. You must duplicate both parts of the file at the same time by specifying multiple volumes on the FROMVOL parameter.
Required Parameters
- FROMDEV
- Specifies the name of the device from which the tape is copied.
- TODEV
- Specifies the name of the device to which the tape is copied.
Optional Parameters
- FROMVOL
- Specifies the volume identifier of the tape being duplicated, or indicates that the tape currently on the magnetic tape device is being duplicated.
Note: If the tape device is contained in a library device, then the volume specified should be the cartridge identifier to be mounted and used. *MOUNTED: The volume currently placed in the device is used.
volume-identifier: Specify the identifier of the labeled volume being duplicated. If the tape placed on the specified device has a different volume identifier than specified, or if it is an unlabeled volume, an error message is sent.
- TOVOL
- Specifies the volume identifiers of the tapes to be created (destination volumes).
Note: If the tape device is contained in a library device, then the volume specified should be the cartridge identifier to be mounted and used. *MOUNTED: The volume currently placed in the device is used. For a media library device, the volume to be used is the next cartridge in the category mounted by the Set Tape Category (SETTAPCGY) command.
*FROMVOL: The volume label of the tape currently mounted on the source device is used to initialize the tape on the output device.
volume-identifier: Specify the identifier to use on the output volume.
- FILES
- Specifies which data files are copied.
*ALL: All data files on the tape volume are copied.
*ACTIVE: Only data files with an expiration date later than the current system date are copied.
- FROMSEQNBR
- Specifies which data file sequence numbers are to be copied.
Element 1: Starting File Sequence Number
*FIRST: All files starting with the first file sequence are duplicated.
*ALL: All files are duplicated.
file-sequence-number: Specify the starting file sequence number to be duplicated. The valid range of sequence numbers is 1 through 16777215. Only the files in the specified sequence number range are duplicated.
Element 2: Ending File Sequence Number
*LAST: All files ending with the last file sequence are duplicated.
*ONLY: Only the file specified in the starting file sequence are duplicated. If *ALL is specified in the first element, then this parameter is ignored.
file-sequence-number: Specify the ending file sequence number of the range to be duplicated. The valid range of sequence numbers is 1 through 16777215.
- TOSEQNBR
- Specifies which sequence number the data files are to be copied to.
*FROMSEQ: The data files are duplicated to the same file sequences as are specified in the from file sequence number parameter.
*END: The data files are added to the logical end of tape. The next valid sequence number is used.
file-sequence-number: Specify the sequence number in which the data file will be copied to. This value is not allowed if the device does not have overwriting capabilities and the value specified is not the next logical value to be used at the end of the logical tape volume. The valid range of sequence numbers is 1 through 16777215.>The duplication begins at the specified file.
- TODENSITY
- Specifies the density or format in which to write the data to the device specified on the TODEV parameter.
*DEVTYPE: The highest capacity density or format supported by the tape device will be used.
- Tape device
- Highest capacity density or format
- 2440
- 6250
- 3422
- 6250
- 3430
- 6250
- 3480
- *FMT3480
- 3490E
- *FMT3490E
- 3570-BXX
- *FMT3570
- 3570-CXX
- *FMT3570E
- 3580-001
- *ULTRIUM1
- 3590
- *FMT3590
- 3590-Exx
- *FMT3590E
- 6335
- *QIC3040
- 6341
- *QIC120
- 6342
- *QIC525
- 6343
- *QIC1000
- 6344
- *QIC2GB
- 6346
- *QIC120
- 6347
- *QIC525
- 6348
- *QIC1000
- 6349
- *QIC2GB
- 6366
- *QIC120
- 6368
- *QIC1000
- 6369
- *QIC2GB
- 6378
- *QIC525
- 6379
- *QIC1000
- 6380
- *QIC2GB
- 6381
- *QIC2DC
- 6382
- *QIC4DC
- 6383
- *QIC5010
- 6385
- *QIC5010
- 6386
- *MLR3
- 6387
- *SLR100
- 6390
- *FMT7GB
- 7207-122
- *QIC4DC
- 7208-002
- *FMT2GB
- 7208-012
- *FMT5GB
- 7208-222
- *FMT7GB
- 7208-342
- *FMT20GB
- 9346
- *QIC120
- 9347
- 3200
- 9348
- 6250
*CTGTYPE: The highest capacity density or format supported by the device for the mounted cartridge type will be used. If the device does not support special cartridge type information, *DEVTYPE is used.
tape-density: Specify the density or format to use.
- 1600
- The data density on the tape volume is 1,600 bits per inch, which is used for 1/2 inch reel tapes.
- 3200
- The data density on the tape volume is 3,200 bits per inch, which is used for 1/2 inch reel tapes.
- 6250
- The data density on the tape volume is 6,250 bits per inch, which is used for 1/2 inch reel tapes.
- *FMT3480
- The format of this tape is FMT3480. The data density on this tape volume is formatted to support a 3480 device. This density is used for 1/2 inch cartridge tapes.
- *FMT3490E
- The format of this tape is FMT3490E. The data density on this tape volume is formatted to support a 3490E device. This density is used for 1/2 inch cartridge tapes.
- *FMT3570
- The format of this tape is FMT3570. The data format is written on the tape volume with a 3570 device.
- *FMT3570E
- The format of this tape is FMT3570E. The data format is written on the tape volume with a 3570E device.
- *FMT3590
- The format of this tape is FMT3590. The data format is written on the tape volume with a 3590 device. This density is used for 1/2 inch cartridge tapes.
- *FMT3590E
- The format of this tape is FMT3590E. The data format is written on the tape volume with a 3590E device. This density is used for 1/2 inch cartridge tapes.
- *QIC120
- The format of this tape is QIC120, which is used for 1/4 inch cartridge tapes that can hold 120 megabytes of data.
- *QIC525
- The format of this tape is QIC525, which is used for 1/4 inch cartridge tapes that can hold 525 megabytes of data.
- *QIC1000
- The format of this tape is QIC1000, which is used for 1/4 inch cartridge tapes that can hold 1200 megabytes of data.
- *QIC2GB
- The format of this tape is QIC2GB. It is used by 1/4 inch tape devices which can store 2.5 gigabytes of data on a standard length QIC2GB cartridge.
- *QIC2DC
- The format of this tape is QIC2DC. It is used to write compacted data to a 1/4 inch cartridge that supports the QIC2GB format.
- *QIC4GB
- The format of this tape is QIC4GB. It is used by 1/4 inch tape devices which can store 4 gigabytes of data on a standard length QIC4GB cartridge.
- *QIC4DC
- The format of this tape is QIC4DC. It is used to write compacted data to a 1/4 inch cartridge that supports the QIC4GB format.
- *QIC3040
- The format of this tape is QIC3040, which is used for 1/4 inch minicartridge tapes that can hold 840 megabytes of data.
- *QIC5010
- The format of this tape is QIC5010, which is used for 1/4 inch cartridge tapes that can hold 13.5 gigabytes of data.
- *MLR3
- The format of this tape is MLR3. It is used by 1/4 inch tape devices which can store 25 gigabytes of data on a standard length MLR3 cartridge.
- *SLR100
- The format of this tape is SLR100. It is used by 1/4 inch tape devices which can typically store 100 gigabytes of compacted data on a standard length SLR100 cartridge.
- *FMT2GB
- The format of this tape is FMT2GB, which is used for 8 millimeter cartridge tapes that can hold 2 gigabytes of data.
- *FMT5GB
- The format of this tape is FMT5GB, which is used for 8 millimeter cartridge tapes that can hold 5 gigabytes of data.
- *FMT7GB
- The format of this tape is FMT7GB, which is used for 8 millimeter cartridge tapes that can hold 7 gigabytes of data.
- *FMT20GB
- The format of this tape is FMT20GB. It is used by 8 millimeter tape devices that can store 20 gigabytes of data on a standard length cartridge.
- *ULTRIUM1
- The format of this tape is ULTRIUM1. It is used by 1/2 inch cartridge tape devices that can store 100 gigabytes of data on a standard length cartridge.
Note: Some of the density values shown can only be specified when a tape device which supports that density is attached to the system.
Note: Self-configured tape devices may define additional valid values for the density parameter. Use iSeries 400 Operations Navigator (Configuration and Service) (Hardware) (Tape Units) (Properties) to find additional valid density values for a specific device, or use the F4=Prompt key on the Tape density field of the CL command to see a list of all valid density values for the attached tape devices. - COMPACT
- Specifies whether device data compaction is performed. If the device specified does not support compaction, this parameter is ignored.
*FROMFILE: Device data compaction is performed only if the file being read from the device specified on the FROMDEV parameter was written using device data compaction.
*YES: Device data compaction is performed on all files written to the device specified on the TODEV parameter.
*NO: Device data compaction is not performed.
- USRLBLPGM
- Specifies whether user tape labels are processed by a user program. The user label program passes user labels that are written to tape to the device specified on the TODEV parameter. The device specified on the FROMDEV parameter passes user labels to the user label program.
*SYSCOPY: User tape labels are processed to allow proper duplication of System/36 save and restore tapes. If the tape volume specified on the FROMDEV parameter has user header labels, they are copied verbatim to the tape volume specified on the TODEV parameter. The same is done for the user trailer labels at the end of the file or for the trailer labels at the end of the file section.
If an end-of-volume condition occurs on the device specified on the TODEV parameter before the logical end-of-tape is found on the device specified on the FROMDEV parameter, user trailer and header labels are created and written to the current and next tape volumes on the device specified on the TODEV parameter. These labels replicate the data from the user header labels read at the beginning of the file.
*NONE: No user tape labels are processed. Any user labels read from the tape volume are ignored. No user labels are written to the tape volume.
The name of the user label program can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
user-label-program-name: Specify the name of the user program that processes the user tape labels.
- FROMENDOPT
- Specifies whether the tape volume placed on the device specified on the FROMDEV parameter is rewound or rewound and unloaded after the operation is complete.
*REWIND: The tape is automatically rewound, but not unloaded, after the operation has ended.
*UNLOAD: The tape is automatically rewound and unloaded after the operation ends.
*LEAVE: The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
- TOENDOPT
- Specifies whether the tape volume placed in the device specified on the TODEV parameter is rewound, or rewound and unloaded after the operation is complete.
*UNLOAD: The tape is automatically rewound and unloaded after the operation ends.
*REWIND: The tape is automatically rewound, but not unloaded, after the operation has ended.
*LEAVE: The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
- CHECK
- Specifies whether a tape file on the volume mounted on the To device is checked for active data before it is overwritten. If an unlabeled volume is on the To device, this parameter is ignored.
*YES: The file to be overwritten is checked for active data. Only the first file to be overwritten is checked for active data, any subsequent files are not checked. If active files are found, the operation is ended and an error message is sent.
*NO: Tape duplication continues with no checking for active files.
- EXPDATE
- Specifies the expiration date to be assigned to all the files when they are copied. This parameter only applies to standard labeled tapes.
*FROMFILE: The expiration date currently specified for the file to be copied is used.
*PERM: All the copied files will be assigned a permanent expiration date.
expiration-date: Specify the expiration date to be assigned to all the files when they are copied.
Examples for DUPTAP
Example 1: Duplicating a single volume to a single volume
DUPTAP FROMDEV(TAPE01) TODEV(TAPE02)This command duplicates the tape volume mounted on device TAPE01 onto the tape volume mounted on device TAPE02.
Example 2: Appending a volume set to the end of a single volume
DUPTAP FROMDEV(TAPE01) TODEV(TAPE02) FROMVOL( VOL001 VOL002) TOVOL(VOLABC) FROMSEQNBR(*ALL) TOSEQNBR(*END)This command duplicates all files from the tape volumes VOL001 and VOL002 onto the end of the to-volume VOLABC on device TAPE02.
Error messages for DUPTAP
*ESCAPE Messages
- CPF67E8
- FROMVOL and TOVOL parameters not correct
- CPF67FA
- Volume compatibility not correct.
- CPF67FD
- File sequence number &3 not correct for volume &2.
- CPF67FE
- No files found on volume &2.
- CPF67F7
- Continuation volume cannot be duplicated.
- CPF67F8
- TOSEQNBR not correct on volume &2.
- CPF6703
- Duplication to *END of partial file not correct.
- CPF6704
- Set not duplicated.
- CPF6708
- Command ended due to error.
- CPF6718
- Cannot allocate device &1.
- CPF6720
- Incorrect volume &2 found on device &1.
- CPF6721
- Device &1 not a tape device.
- CPF6722
- End of tape found on device &1.
- CPF6734
- File sequence number &3 not found on volume &2.
- CPF6740
- TODEV and FROMDEV must be different.
- CPF6741
- Nonlabeled tape format not valid on device &1.
- CPF6745
- Device &1 not a media library device.
- CPF6751
- Load failure occurred on device &4.
- CPF6754
- Active file &4 found on volume &2.
- CPF6760
- Device &1 not ready.
- CPF6768
- Volume on device &1 is write protected.
- CPF6772
- Volume on device &1 cannot be processed.
- CPF9814
- Device &1 not found.
- CPF9825
- Not authorized to device &1.