Compares the contents of the tofile with the
contents of the fromfile, record by record, immediately
after a copy operation. The two files must reside on either disk
or magnetic tape and must have identical
record characteristics, that is, record size, format (fixed,
variable, or undefined), and type (ASCII or
binary).
The VERIFY function is essentially the same as the
COMPARE function, except that VERIFY is always performed in conjunction
with the copying of a file, whereas COMPARE is not.
Syntax |
|
;VERIFY [=number-of-errors]
|
Where:
- number-of-errors
Is an integer specifying the number of errors after
which
the operation terminates. If this parameter is omitted, the default is 1.
File Attributes |
|
Both the fromfile and tofile must be a disk file or
a magnetic tape file. The fromfile must have read access,
and the tofile must have read/write access.
Operation |
|
Each time FCOPY detects an error while verifying files, it prints
a message on the standard listing device
(your terminal in a session or a printer in a job). The message
specifies the number of the fromfile record in
which the error occurred.
Restrictions |
|
You cannot use VERIFY with the CHAR, CLEAR, KANA,
OCTAL, HEX, or HEXO functions.
Examples |
|
In the example below, FCOPY copies the disk file OLDFILE to
the disk file DCOPY and then compares the two
files, record by record. If FCOPY finds an error, it prints a
message on the standard listing device and terminates the operation.
>FROM=OLDFILE;TO=DCOPY;VERIFY
|
In the example below, FCOPY copies a file from the magnetic tape
*TAPE2 to the magnetic tape *TAPE6
and then rewinds the two tapes and compares them record by
record. Each time it finds an error, FCOPY
prints a message on the standard listing device. The tenth error
terminates the operation.
>FROM=*TAPE2;TO=*TAPE6;VERIFY=10
|