6 Saving and loading files


By now you must be getting impatient at seeing your disc unit or cassette recorder standing there doing nothing, to say nothing of your printer, if you have one. So this chapter is devoted to getting them working.

Advice on the disc unit and cassette recorder in this book and the VIEW Guide is confined to matters affecting word processing. For connecting up and general use refer to your BBC Microcomputer System User Guide and Disc Filing System User Guide.

6.1 Disc systems

6.1.1 Setting up


Before you can use discs your system must be in disc mode. It may in fact be set to default to disc mode (ie this may be its normal state) in which case you can go ahead and use the disc drive immediately. If it defaults to cassette mode, however, you must first enter command mode and type

*DISC RETURN

6.1.2 Formatting


Before you can record anything onto a disc you must format the disc. The Disc Filing System User Guide tells you how to do this. The formatting routine can be carried out while the system is in VIEW, using command mode. Note, however, that formatting a disc will destroy any text currently in the computer's memory.

6.1.3 Using Discs


Saving and loading files is all done in command mode. To save a file, use

SAVE (filename) RETURN

If there is another file of that name already on the disc, this command wipes it out and replaces it with the new one - which can be very useful for updating texts, but very frustrating if you do it by mistake. So always keep back-up copies of the texts you cannot afford to lose. (You can't say we didn't warn you! Of course we realise that nobody makes adequate back-up copies at first, and everybody has to learn the hard way . . . that's life!)

Taking a file from the disc and placing it in the computer's memory is done with the command LOAD:

LOAD (filename) RETURN

or

L (filename) RETURN

Before the new file is loaded, any text currently in the computer's memory is wiped. If you wish not to wipe all the current text but to keep it and add the new text from the file to it, you should use the command READ:

READ (filename) RETURN

So whether you READ or LOAD depends on whether you want to add to what is already in the computer's memory, or whether you want to replace it with new text.

Save a few pieces of text onto the disc for yourself, checking the procedure in the Guide. Try out LOAD and READ and watch their effects. If you want to delete any files you have saved, use

*DELETE (filename) RETURN

but do not delete all the files, since we need some later for printing.

A useful variant on the SAVE command described above is to use SAVE by itself. Whenever you load a file the editing line in the command mode message shows the name of the file you have loaded:

Editing (filename)

If you then modify the file and want to return it to the disc under the same name, as an updated version, you do not need to name it in the SAVE command. Simply type

SAVE RETURN

and it will be saved under the name given in the editing line. This can be a time saver, but it is always worth checking the editing line to make sure that the name there is really the on under which you want to save the text.

6.1.4 Locking files


If there are any files you particularly wish to preserve, you can 'lock' them with the command

*ACCESS (filename) L RETURN

Try this with one of the files you have saved. Once a file is locked, you cannot update it by saving another file of the same name. If you try to, the system replies File Locked. To unlock it, use the ACCESS command again without the L.

To find out what files are on the disc (including which files are locked) type

*. RETURN or *CAT RETURN

Locked files are marked with the letter L.

6.1.5 Help!


It may be helpful to know that there is a list of disc commands available on the screen, which can serve as a rapid reminder. You can consult the list by typing

*HELP DFS RETURN

However, for the finer points of disc operation you should consult the Disc Filing System User Guide.

6.2 Cassette systems


If at all possible, use a cassette recorder with a remote control (REM) socket. Otherwise you will find yourself constantly rewinding and estimating positions on the tape.

Before you use a cassette recorder, your system must be in cassette mode. It may in fact be set to default to cassette mode (ie this may be its normal state), in which case you can go ahead and use the cassette recorder immediately. If it defaults to disc, however, you must first enter command mode and type

*TAPE RETURN

6.2.1 Recording files


Make sure there is a blank cassette in the recorder.

Type

SAVE (filename) RETURN

The 'cassette motor' lamp turns on. The message appears on the screen:

RECORD THEN RETURN

Press RECORD on your cassette recorder and RETURN on the computer. When the prompt (=>) reappears, the file is recorded.

If your cassette recorder has no motor control (REM) socket, stop it quickly. If it has a REM connection it will stop automatically.

6.2.2 Reading files


When using VIEW with cassettes, there is no LOAD command, ie no command which automatically wipes the current text from memory and replaces it with new text from a tape file. Instead there is the READ command which adds new text from the file to any text currently in memory. If you wish to wipe text from memory first type

NEW RETURN

Wind back the cassette to the appropriate point.

Type

READ (filename) RETURN

The 'cassette motor' lamp comes on.

Press PLAY on the cassette recorder. Depending on the cassette recorder, you may hear high- or low-pitched sounds. When the prompt (=>) reappears the file has been read in.

6.2.3 Printing


If you have difficulty in printing out files from cassette, in particular if you keep getting Block? messages, you may be able to solve the problem by an alternative method of recording onto cassette. This is covered in the next chapter.

6.3 Name of files


One final point affecting both disc and tape: how should you name your files?

One thing to beware of is the use of spaces in filenames. For example, you might type the first chapter of a report and save it under the name 'ABC'; you might then go on to type the next chapter and save it in a second file which, quite naturally, you would call 'ABC 2'.

Unfortunately the computer takes the space between the C and the 2 to indicate that this is the end of the filename. To the computer, therefore, you have saved one file called 'ABC' and then another file called 'ABC', which overwrites the first. The cure for this is to miss out the space and call the second file 'ABC2'.

Think out your filenames carefully. Ideally they should be unique. If some of them relate to each other (like chapters in a report) they should reflect this fact. It is also best if they actually mean something and are not just random sequences of letters which you will have difficulty in remembering.