HP 3000 Manuals

Copying Tapes [ FCOPY Reference Manual ] MPE/iX 5.0 Documentation


FCOPY Reference Manual

Copying Tapes 

The general methods for copying tapes described in this chapter apply to
unlabeled magnetic tapes, serial disks, and cartridge tapes.  If you need
to copy files from or to labeled tapes, refer to the instructions for
using labeled tapes later in this chapter.


NOTE Labeled tapes must be used if the file being written will extend beyond one reel.
Specifying Tape Files Use the SKIPEOF function to position an unlabeled tape, cartridge tape, or serial disk at the beginning of the fromfile or tofile you want to copy. The SKIPEOF function "skips" over a specified number of end-of-file (EOF) marks to position the tape at the beginning of a particular file. You can specify the number of EOF marks to be skipped as either absolute file numbers (for example, the fifth file on the tape) or relative file numbers (for example, the fifth file from the tape's current position). A plus (+) or minus (-) sign distinguishes a relative file number from an absolute file number. A plus sign tells FCOPY to skip forward, and a minus sign tells FCOPY to skip backward. A comma before the plus or minus sign (for example, SKIPEOF=,+1) indicates that the file is a tofile; no comma (for example, SKIPEOF=+1) indicates a fromfile. The example below tells FCOPY to copy the file three files before TAPEA's current position and place it in the fifth file on TAPEB. >FROM=*TAPEA;TO*TAPEB;SKIPEOF=-3,5
NOTE When FCOPY copies files from or to magnetic tapes, it leaves the tape positioned before the EOF mark for the file it just copied. Thus, if you want to copy a series of files from or to the same magnetic tape, be sure to include SKIPEOF=+1 in the commands for copying each file after the first. SKIPEOF=+1 instructs FCOPY to position the tape at the beginning of the next file.
Ignoring Tape Errors Use the IGNERR function when you want certain file system errors to be ignored during the process of copying files from magnetic tape. This allows the recovery of as much data as possible from faulty media. The following errors can be ignored: 21 Data Parity 26 Transmission 27 I/O Timeout 38 Type Parity Using IGNERR, you can instruct FCOPY to terminate the copy operation after it encounters a given number of errors. The example below instructs FCOPY to ignore errors, but to terminate if it encounters more than five errors. >FROM=*TAPE;TO=DISC3;IGNERR=5 Comparing Files To compare the contents of two files without changing either file, use the COMPARE function. You can compare the contents of a disk file and a tape file or the contents of two files stored on tape. As with the IGNERR function, COMPARE lets you specify a number of errors after which it terminates. The default is 1. The example below compares the disk file TEXTA with the first file on TAPE1: >:FILE TAPE1;DEV=TAPE;REC=-80,16,F,ASCII >FROM=TEXTA;TO=*TAPE1;COMPARE COMPARE ERROR FOUND AT RECORD 52, BYTE 19 *304* COMPARE OPTION: RAN OUT OF COMPARE ERRORS AT FROMFILE RECORD 53 53 RECORDS PROCESSED * * * 0 ERRORS Verifying Copied Files Use the VERIFY function to compare the contents of two files immediately after copying them. As with IGNERR and COMPARE, VERIFY lets you control the number of errors that FCOPY reports. If you do not specify a maximum number of errors, FCOPY terminates after it encounters the first error. The example below copies the third file on TAPE2 to the next file on TAPE6 and then compares the two files. >:FILE TAPE2;DEV=TAPE >:FILE TAPE6;DEV=TAPE >FROM=*TAPE2;TO=*TAPE6;SKIPEOF=3,+1;VERIFY EOF FOUND IN FROMFILE AFTER 19 RECORDS 20 RECORDS PROCESSED * * * 0 ERRORS Changing the Tape Blocking Factor Use the DEBLOCK function to change the record blocking factor as you copy a file. DEBLOCK is most useful when copying tapes from other computer systems to the HP 3000. The HP 3000 blocks records to tape with an even number of bytes per record. Other systems may block records to tape with an odd number of bytes per record. When you copy a foreign file to the HP 3000, you must provide a tape format compatible with MPE. For more information on copying foreign tapes, refer to "Copying Foreign Tapes" later in this chapter. To deblock a file with odd-byte records, perform the following steps: 1. Use the MPE FILE command to treat each block of the fromfile as a single record and set the blocking factor to 1. The record length should be the old record length times the old blocking factor. For example, a block of ten 79-byte records would be represented as a 790-byte record with a blocking factor of 1: >:FILE TAPEFILE;REC=-790,1,U,ASCII 2. In the FCOPY command, set DEBLOCK equal to the original record length. For example, >FROM=*TAPEFILE;TO=DISCFILE;DEBLOCK=-79 EOF FOUND IN FROMFILE AFTER RECORD 789 790 RECORDS PROCESSED * * * 0 ERRORS Combining Disk Files on Tape To combine several disk files into a single tape file, follow the steps described below: 1. Use the MPE FILE command to describe the tape file to be written. For example, >:FILE T;DEV=TAPE;REC=-80,20,F,ASCII 2. Copy the first disk file to tape using an asterisk before the tofile name to backreference the FILE command. For example, >FROM=DATA1;TO=*T EOF FOUND IN FROMFILE AFTER RECORD 610 611 RECORDS PROCESSED * * * 0 ERRORS 3. Copy the subsequent disk files to tape without repositioning the tape drive. Use an asterisk as the tofile name. For example, >FROM=DATA2;TO=* EOF FOUND IN FROMFILE AFTER RECORD 711 712 RECORDS PROCESSED * * * 0 ERRORS >FROM=DATA3;TO=* EOF FOUND IN FROMFILE AFTER RECORD 472 473 RECORDS PROCESSED * * * 0 ERRORS Combining Tape Files on Disk To combine several tape files, or subsets of tape files, in a single disk file, perform the following steps: 1. Use the MPE FILE command to give the disk file append access (ACC=APPEND). The disk file must be large enough to hold the contents of all of the tape files, and you must specify its record structure. For example, >:FILE AMALGAM;ACC=APPEND;REC=-80,16,F,ASCII;DISC=5000 2. Use a second FILE command to describe the tape file. For example, >:FILE T;DEV=TAPE;REC=-80,1,F,ASCII 3. Copy the first tape file to the disk file. Precede the file names with asterisks to reference the two file commands. If you intend to copy only a subset of the tape file, use the SUBSET function. For example, the command below copies all records with the character "C" in column 1. >FROM=*T;TO=*AMALGAM;SUBSET="C",1 9 RECORDS PROCESSED * * * 0 ERRORS 4. In subsequent FCOPY commands, use an asterisk to reference the same tofile. Use SKIPEOF to specify the position of the fromfile on tape. For example, >FROM=*T;TO=*;SKIPEOF=1 16 RECORDS PROCESSED * * * 0 ERRORS >FROM=*;TO=*;SKIPEOF=3 EOF FOUND IN FROMFILE AFTER RECORD 302 303 RECORDS PROCESSED * * * 0 ERRORS


MPE/iX 5.0 Documentation