NOTE: Dual drives make fuller use
of
this command, copying programs from one
diskette
to
another in a single-disk unit. To
do
that on the 1571, check your Test!
Demo diskette
to
find the programs that you need or use the DOS Shell described
in
Chapter 4.
VALIDATE
The VALIDATE command recalculates the Block Availability Map (BAM)
of
the
current diskette, allocating only those sectors still being used
by
valid, properly-closed
files and programs.
All
other sectors (blocks) are left unallocated and free for re-use, and
all improperly closed files are automatically scratched. This brief description
of
its
workings doesn't indicate either the power or the danger
of
the VALIDATE command. Its
power is
in
restoring
to
good health many diskettes whose directories or block availability
maps have become muddled. Any time the blocks used
by
the
files
on
a diskette plus the
blocks shown
as
free don't add
up
to the 664 (in
1541
mode) or 1328 (in
1571
mode)
available on a fresh diskette, VALIDATE
is
needed, with one exception below. Similarly,
any time a diskette contains an improperly-closed file (splat file), indicated by
an
asterisk
(*) next
to
its
file
type in the directory, that diskette needs
to
be validated. In fact, but for
the one exception, it is a good idea
to
VALIDATE diskettes whenever you are the least bit
concerned about their integrity.
The exception
is
diskettes containing Direct Access files,
as
described in Chapter
7.
Most direct access (random) files
do
not allocate their sectors
in
a way the VALIDATE
command can recognize. Thus, using VALIDATE on such a diskette
may
result
in
un-
allocating all direct access files, with loss of all their contents when other
files
are added.
Unless specifically instructed otherwise, never
use
VALIDATE on a diskette containing
direct access files. (Note: these are
not the same
as
the relative files described
in
Chapter
6. VALIDATE may be used on relative files without difficulty.)
FORMAT FOR THE VALIDATE COMMAND
PRINT#
15,'
'V
ALIDATE0"
or abbreviated
as
PRINT#15,
"V0"
where
"0"
is
the drive number.
As
usual,
it
is
assumed
file
15
has been opened
to
the
command channel and will be closed after the command
has
been executed.
EXAMPLE:
PRINT#15,"V0"
23