< Previous | Contents (GEM) | Contents (DOS+) | Next >
This chapter outlines some general features of running applications programs under DOS Plus. You will also find ideas on how to minimise some of the repetitive tasks involved in using your Master with an applications package.
An application is any program or set of programs that enables you to perform a specific task. Many commercial applications are available – spreadsheets for your accounts, word processing packages for your letters, databases for your records, or multi-purpose packages which do all three. Or you may have written your own application to run under DOS Plus.
Whatever the task is, and whatever your chosen application, you can treat it as a program, needing some sort of organised input, and producing some sort of organised output. And the process is always the same. To run the program you need to switch on the computer, load DOS Plus, load the program, enter the input, produce the output, leave the program, perhaps tidy up and file the output, leave DOS Plus and switch off the computer.
In the simplest case, you use DOS Plus just to run the application program: all you have to do is type the program name on the command line. For example, suppose you have bought a word processing package called EXAMPLE. Running EXAMPLE involves the following steps:
You have done everything you want using the application itself, including saving, sorting and deleting your text files.
There are, however, three ways in which your life with EXAMPLE may not be quite so simple:
1 | EXAMPLE may be a general purpose program that needs to be tailored for your particular configuration. Typically you might need to give specific details of your printer and the amount of memory you have available, and you will probably want to set the function keys if your application has function key facilities. This whole process is known as 'configuring' your application. |
||
2 | EXAMPLE may not include all the facilities you want for handling your files. Typically you might want to look at the DIR listing of a particular disc, to see if it's the one you need or to remind yourself of a particular filename. This means leaving the application, using DOS Plus commands, and then reentering the application where you left it. |
||
3 | Similarly, after you have finished with an application, you may want to do some 'housekeeping' tasks that you can't do within the application. For example, you may want to backup all your files on disc, or process selected files to use as input for another application. |
In the first case, what you need to do depends very much on the particular application. In other cases, the documentation provided with the package will enable you to configure the package for your Master 512. More than likely, you will be able to 'save' this configured version of the application, so you need only go through the exercise once.
In the second case, you need to ensure that you leave the application tidily, so that you do not lose any files or waste any of your work. So follow the procedure as if you had finished the task, quitting the application in the usual way. When you restart, you may have to repeat some activities or go through some file opening exercise again to get back to your exit point.
A few applications, such as GEM, allow you to break off and return to the application without having to re-load it. Such applications make use of the DOS Plus EXIT command. If you are running an application that allows you to use EXIT, and you are in DOS Plus, and you want to return to the application, simply type:
A>EXIT RETURN
and you will return to the application without reloading the program.
In the third case, your concern is probably one of efficiency, file security or storage space (or a mixture of all three). All three involve moving, erasing and duplicating files using the DOS Plus commands covered in earlier chapters. But bear in mind that sensible use of filetype extensions and wildcard characters can make housekeeping quite easy. You might also consider using a `batch file' if you are continually doing the same kind of routine job that involves a series of DOS Plus commands – see the next section.
So far we have considered using an application as an occasional exercise. You might, however, use a particular application (say word processing) almost all the time. If so, you may be able to save yourself some time by writing a program such that the application is loaded automatically when you load DOS Plus.
Such a program is an example of a 'batch file' – that is, a file containing a list of DOS Plus commands which DOS Plus reads to save you entering each command individually from the keyboard. A batch program used for a startup sequence is often called an AUTOEXEC.BAT batch file.
You can create an AUTOEXEC.BAT file (or any batch file) using a word processing program or editor and then store it on the DOS Plus boot disc (or hard disc). The file can contain any DOS Plus commands, and they will be executed automatically as soon as DOS Plus is loaded. The effect is therefore as if you had loaded the application directly.
Batch files allow you to display remarks on the screen as the batch file is being executed, and also have a facility for pausing whilst you change discs, for example, or type in some information such as the current date.
Below is an example of an AUTOEXEC.BAT file which will automatically run after you load DOS Plus, change the default drive to B, prompt you to insert the disc containing your word processing program EXAMPLE, and then load EXAMPLE. (REM is the batch programming command for 'remark'):
REM Ready to load word processor EXAMPLE . . .
B:
PAUSE Insert EXAMPLE Disc in Drive B
EXAMPLE
You might want to create another batch file for the disc housekeeping purposes. For example, at the end of each day's work you may want to store your files on a backup disc. Below is a batch file that would do this for you. It assumes that all the files you want to backup have the XWP (for example) filetype.
PAUSE load work disc in drive A
PAUSE load backup disc in drive B
COPY A:*.XWP B:*.BAK
REM Copy finished. Don't forget to take out the discs.
If you called this file, say ENDOFDAY.BAT, you could run it simply by typing the command:
A>ENDOFDAY RETURN
after you have left the application you were using. It would prompt you to insert the appropriate discs, perform the copy operation, and then prompt you to remove the discs before returning you to the A> prompt so that you can switch off.
You can put any valid DOS Plus command into a batch file, and there are several powerful batch programming commands in addition to REM and PAUSE. Some of these are mentioned in Chapter 8 and all of them can be found in the DOS Plus Users' Guide and the DOS Plus Programmers' Reference Guide.