Before typing
in
examples
In
this chapter, type new first
to
ensure that Archive
is
cleared
and ready for a fresh
start.
The open command prepares a
file
for
both reading and writing.
If
you
open a
file
with the open command, instead of look
you
will
be able
to
write
to
the
file
to
change
Its
contents
as
well
as
read
it.
This means that any additions, deletions
or modifications
will
make a permanent change
to
the copy of the
file
when
it
is
closed.
Type:
open
"gazet"
CHAPTER
5
MODIFYING
A
FILE
TABIII
ATF
TABULATE
TABULATE
TABULATE
TABULATE
TABULATE
TABULATE
TABULATE
If
you
have opened a
file
for
reading
w',th
look then
you
must not use any commands
which
will
attempt
to
modify the
data.
If
you
do,
Archive
will
report an errm The commands
described
in
this chapter modify data
files
and
so
should only be used with a
file
opened
with open.
Display the first record of the
file
with:
first
display
When you have finished modifications
to
the file
you
must close the
file
(using close
CLOSING
THE
FILE
or new)
to
ensure that
all
the changes are recorded.
If
you
do
not close a file properly (for example, if
you
just turn off the computer when
you have finished) the file may be changed and your most recent changes will not be
recorded. Always make sure that there are no open files on a cartridge before you
remove it from the Microdrlve. Do not switch off the computer without first closing
all open files and removing the cartridges from the Microdrives.
The insert command
is
used
to
add one or more records to the current
file.
When you
INSERT
use
insert you
will
be asked
to
type
in
the contents of each field of the new record.
Type:
insert
The display area
will
now show:
LogicaL
name
main
countryS
continentS
capitalS
currency$
languagesS
pop
area
gdp
You
can now type
in
the contents of each field.
You
can step from one field
to
the next
by pressing ENTER or TABULATE or
you
can step back
to
the previous field by holding
down SHIFT and pressing TABULATE.
You
can make
as
many changes
as
you
like
to
the fields
until
you
are satisfied. The new record can
be
inserted
into
the
file
by pressing
F5.
Press F4
to
leave insert.
Try
typing:
SCOTLAND
EUROPE
EDINBURGH
POUND
STERLING
ENGLISH
10
30
50
12184
9