|★ APPLICATIONS ★ BUREAUTIQUE ★ MICROFILE ★|
|Data Remember||Completing the file|
Part One of a powerful filing program by Peter Patton
Microfile is a data filing program for the CPC464, which will allow you to create data files with up to IS fields of 50 characters, which is more than sufficient for most home and small business applications. The program will prompt you every step of the way, but the following points should be considered carefully.
Cassette data files are slow and cumbersome things to use, and for this reason the program holds it entire data file in memory. Data is stored dynamically, that is without waste, so although you may set up a data file in which records can hold up to 750 characters, only the actual characters entered into such records are placed in the file and the unused portion at the end of a data field are ignored.
Each time a data file is loaded into memory, a routine within the program checks to see how much memory space remains, and allocates the correct number of free records available for the current working session.
In order to reclaim the free space it is necessary to Save the data file, and then re-Load it. This means that if you start a session you may have, for example, room for 100 new records. If you were to enter 20 new records the free record counter would tell you that you have space for 80 more records. However, if you Save the file and xe-Load it again, then the free record counter may tell you that you now have space for 95 records. This does not mean that 15 records have been lost, it merely indicates that that much free space has been reclaimed. In this way it is not inconceivable that your files may exceed 1000 data records, all of which are held in memory at the same time.
When deciding how your data file is to be structured, you should first sit down with pen and paper, and decide what sections or fields your data can be broken down to, and how many characters the largest single data item will take. In this way you will find that your files are laid out in the way which optimises the storage method outlined above. For example, if you wish to create a file which will hold names and addresses, you may decide that you need these data fields:
Having decided that these are the fields you wish to create, you must then allocate space to store this information. If we take field one Surname as an example, it would be all right to allocate 10 characters to this field, if you could be certain that all Surnames to be entered here would be 10 characters or less. However, if you have to enter the name Higginbottom, you will end up with the name Higginbott. This is because you failed to make allowances for such an eventuality when you created the file.
Similarly, if you think you'll play it safe and make the fields all of the maximum 50 characters, you will reduce your initial file capacity to some 47 records, thus you will spend much unnecessary time Saving and re-Loading the file in order to create more free records. So you can see that five minutes with pen and paper, can save many hours of frustration later. A typical example of the same file, structured with care may be:
Such a file will now hold over 200 records at the outset, and may well expand to over 400 records, all of which are held in memory and thus are immediately accessible.
CPCrulez[Content Management System] v8.7-desktop/cache
L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.