FCOPY Reference Manual (32212-90008)
36 Chapter3
FCOPY Applications and Examples
Copying Tapes
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