home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / databases / progs / maxifile / instruct < prev    next >
Encoding:
Text File  |  1990-04-27  |  18.8 KB  |  463 lines

  1.  
  2.    Maxifile-3 
  3.  
  4.        MAXIFILE 
  5.  
  6. The original MAXIFILE program was written in 1985 for the BBC B to provide a 
  7. simple  database which maximised the number of records that could be handled 
  8. entirely within memory. To make the most of  limited  space,  overlays  were 
  9. extensively  used.  The  software  was used ever since for a wide variety of 
  10. purposes in a secondary school, thus  standing  up  to  the  tests  of  both 
  11. practical use and time. 
  12.  
  13. When  the  Master series came on the scene, a special version was written in 
  14. 128 BASIC to utilise the extra memory available in this mode. Overlays  were 
  15. no   longer  used,  partly  because  the  extra  capacity  gained  was  less 
  16. significant and partly because disc access speed was slower in 128 BASIC. 
  17.  
  18. MAXIFILE-3 is the third version of the program, totally rewritten in BASIC V 
  19. for  the  Archimedes and A3000 machines. The link between the three versions 
  20. however remains, in that files are all stored in identical format  so  that, 
  21. memory  permitting,  any MAXIFILE data can be accessed by any version on any 
  22. machine. 
  23.  
  24.      
  25.      Special Features of MAXIFILE-3 
  26.    
  27. The  vastly  increased  capacity  of  the new machines has altered the whole 
  28. concept of database size. For a 1Mb machine, the  restriction  is  now  much 
  29. more  likely  to  be  the  capacity  of  your  disc than the capacity of the 
  30. computer. The principle of all records held in RAM  is  still  followed,  so 
  31. beware  of  creating larger files than you really need - it still takes time 
  32. to load and save to disc! 
  33.  
  34. Apart from increased file size, the following features are new: 
  35.  
  36. 1) The ability to accept field sizes up to 255 characters long. 
  37. 2) The ability to create and save sub-files. 
  38. 3) Improved search routines for creating sub-files. 
  39. 4) All printout dated. 
  40. 5) Simpler alteration of fields. 
  41. 6) Provision to change discs to load or save. 
  42. 7) Extensive use of mouse as an alternative to keyboard input. 
  43. 8) Enhanced visual presentation. 
  44.  
  45. The  program  itself  has been entirely rewritten from scratch, enabling new 
  46. features of BASIC V to be used to the full. While all the original  features 
  47. are  still  available,  some occur in different ways, and some include other 
  48. minor improvements to make them that little bit more useful. 
  49.  
  50. A particular advantage of BASIC V is that with new commands like  IF...THEN, 
  51. there  is  less need to jump off into minor procedures, with the result that 
  52. the structure of the program is easier to follow.  The  result  is  that  it 
  53. becomes easier than ever to add to or modify the program to taste. Provision 
  54. was made for a routine to allow more than one page of data per  record,  but 
  55. this  has  yet  to  be written - any offers?! It is also still short of most 
  56. databases in not allowing for arithmetical calculations on fields, nor is it 
  57. written  to  take advantage of RISC-OS. Nevertheless it will hopefully prove 
  58. to be eminently usable and useful in the MAXIFILE tradition! 
  59.  
  60.  
  61.  
  62.  
  63.         - 1 - 
  64.  
  65.  
  66.  
  67.  
  68.    Maxifile-3 
  69.  
  70.    Using MAXIFILE-3 
  71.  
  72. Getting started - the Introductory Screen 
  73.  
  74. The programme can be started using SHIFT-BREAK, or  by  entering  BASIC  and 
  75. CHAINing MAXIFILE3. The introductory screen offers three options: to open an 
  76. existing file, to create a new file, or to  quit.  Quitting  at  this  stage 
  77. would be cowardly, but if you must, then choose 3! 
  78.  
  79. Open an Existing File 
  80.  
  81. This will immediately mount the disc in drive 0, and display the contents of 
  82. the datafiles directory. Note that it  is  assumed  that  there  will  be  a 
  83. directory  $.DATAFILES  on the disc, and if you are not using a disc already 
  84. prepared for use with MAXIFILE-3 then you should set one up  before  you  go 
  85. any further. 
  86.  
  87. Enter  the name of the file you wish to load. If it is not the correct disc, 
  88. then press RETURN, insert the correct disc, press any key, and  the  process 
  89. repeats. 
  90.  
  91. On  entering the correct name, the file will load, and you will be presented 
  92. with the Main Menu screen. 
  93.  
  94. Create a New File 
  95.  
  96. Enter the number of fields that you will need. This must be  accurate  since 
  97. you  will  not  be able to change it subsequently. You are however given the 
  98. opportunity to change any errors in the next part, which  is  to  enter  the 
  99. names and lengths of these fields. Note that field lengths cannot exceed 255 
  100. characters, and the program automatically reduces any over-ambitious entries 
  101. to this limit! 
  102.  
  103. After the details have been entered the computer will give you a rough guide 
  104. as to the maximum number of records it can handle. It should  be  emphasised 
  105. that  it is very rough, based on using 90% of available memory. It is likely 
  106. that you could get away with using more, but remember that your file has  to 
  107. be  saved  on disc which at most only takes 800k. If you are using a machine 
  108. with 2Mb or more, you should drastically  reduce  the  recommended  maximum. 
  109. Remember  also that a large file takes a longer time to load or save, and so 
  110. you should not set a size beyond your likely needs. 
  111.  
  112. You are now presented with the Main Menu screen. 
  113.  
  114. The Main Menu Screen 
  115.  
  116. This menu could be called the File Menu, since  it  deals  only  with  those 
  117. functions  relating to the file or sub-file alone. Thus you may wish to view 
  118. a file, save it or print it; all other activities within  the  database  are 
  119. record  or  field  related.  The  Main  Menu  therefore  only gives you four 
  120. choices: to view, to save, to print or to quit. 
  121.  
  122. View Records 
  123.  
  124. This option leads you to the main record screen. As this  contains  most  of 
  125. the  important  features  it is described fully in the next section of these 
  126. notes. Briefly, you can browse through the records by using 1 for forward or 
  127. 2  for  back,  or click the select button on these boxes. If you hesitate to 
  128.  
  129.         - 2 - 
  130.  
  131.  
  132.  
  133.  
  134.    Maxifile-3 
  135.  
  136. try the other buttons before reading the appropriate section, then press  0, 
  137. or click on the Main Menu button, to return back to the Main menu. 
  138.  
  139. Save File or Sub-File 
  140.  
  141. Whether it will save the mainfile or the sub-file will depend on which Index 
  142. you are in. You start off in Index 0 which  is  always  the  original  file. 
  143. Moving into a sub-file can only be done from the Record Screen, but whenever 
  144. you exit from the Record screen you remain in whichever  file  you  were  at 
  145. that  time,  or  in  the  new  sub-file if you have just selected a new one. 
  146. Sub-files are listed as either Index 1 or Index 2. 
  147.  
  148. Thus the save routine will apply to the current Index, and will  operate  in 
  149. the  same  way without regard to which file you are in. The program asks you 
  150. for the name to be used, and you can press RETURN to use the  same  name  as 
  151. before. However beware! Don't over-write your main file with a sub-file! 
  152.  
  153. You  are also given the option of saving only part of the file by specifying 
  154. the first and last records to be saved. This  facility  could  be  important 
  155. when  saving  a  sub-file. The main-file might be very large, and you may be 
  156. limited on disc space. Therefore to save the sub-file  with  relatively  few 
  157. records as a smaller file could be essential. A sub-file is usually going to 
  158. be much smaller than the main file, but the defaults have to assume you want 
  159. it to be the same size. 
  160.  
  161. A sub-file is saved just as though it was a normal MAXIFILE datafile, and it 
  162. can therefore be reloaded as the main file, or  can  be  loaded  into  other 
  163. earlier versions of MAXIFILE provided it is not too large. 
  164.  
  165. It  is  important  to  remember  that MAXIFILE-3 will save the blank records 
  166. (filled with asterisks) as well as the valid records. This is to ensure that 
  167. sufficient  space is kept on the disc for future expansion of the file. As a 
  168. result, a large file will take longer to  save.  On  the  other  hand,  when 
  169. loading,  MAXIFILE-3  will  only load valid records, and will not waste time 
  170. loading blanks. 
  171.  
  172. There is however a catch to this, namely that if you allow any blank records 
  173. to  occur  between  valid  records,  the  whole  file will be saved, but the 
  174. complete file will not be loaded subsequently. In normal  use  this  problem 
  175. should  not  arise  because the program is written to try to ensure that any 
  176. blanks are put at the end of the file. However it can happen if  you  choose 
  177. to  alter  a  blank  record  that does not immediately follow the last valid 
  178. record. If in doubt, SORT the file before saving. 
  179.  
  180. Print File or Sub-File 
  181.  
  182. As with the saving routines, the  print  routine  will  apply  only  to  the 
  183. current  Index.  Users  of  previous  versions  of  MAXIFILE  will notice an 
  184. important difference  here  because  there  are  no  longer  special  search 
  185. routines  included  in  the  Print  section.  This is because you can create 
  186. sub-files instead, and if you wish to access only  particular  records  then 
  187. you should create the appropriate sub-file first, and then print that. 
  188.  
  189. The print routine does however enable you to select which fields you wish to 
  190. include, and in which order. Their selection should be easy  to  understand. 
  191. The  select button on the mouse can be used rather than the letter keys, and 
  192. you can use RETURN rather than the 'No more fields' option. 
  193.  
  194.  
  195.         - 3 - 
  196.  
  197.  
  198.  
  199.  
  200.    Maxifile-3 
  201.  
  202. The layout of the hardcopy is automatic, and depends on whether it will  fit 
  203. in  columns  or  not.  If  you have a long file that does not fit across the 
  204. page, then you might use less paper if you select fields to fit and do  more 
  205. than  one  run! A number of printer codes are included in the print routine, 
  206. and are all Epson codes. If you have a printer  than  does  not  conform  to 
  207. Epson  codes  then  you will need to do some alterations. Codes used include 
  208. underline, elite, condensed and italics. 
  209.  
  210. Where possible the printout is in columns, in the largest  print  size  that 
  211. will  fit.  If  it  will  not fit in condensed, then printout is in pica (10 
  212. ch/in), and fields are printed line by line. This is obviously  more  costly 
  213. in  terms  of  paper, taking a minimum of two lines for every field of every 
  214. record. 
  215.  
  216. You may choose the range of records to be printed, defaults being the  whole 
  217. file.  The  printout  is  either headed or tailed with the day and date, the 
  218. name of the file and the index number, and the number of records listed. 
  219.  
  220.  
  221. The Record Screen 
  222.  
  223. This is the heart of MAXIFILE-3 where all alterations, additions, deletions, 
  224. selections, sorts and searches take place. There are 10 choice  boxes,  plus 
  225. additional  features  selected using the mouse. At the top of the screen the 
  226. filename appears, the maximum number of records the file is set up to  hold, 
  227. and the current Index number. The record number also appears top right. 
  228.  
  229. Next 
  230.  
  231. Simply  click  select  on  this  box,  or press '1' (or even press SPACE) to 
  232. display the next record in the file. If you do so  while  viewing  the  last 
  233. record then you will return to the Main Menu. 
  234.  
  235. Last 
  236.  
  237. Select with the mouse or press '2' to go back to the previous record. 
  238.  
  239. Delete 
  240.  
  241. If you are in Index 0 (i.e. the main file) then this routine will delete the 
  242. record entirely, although the record will not of  course  be  lost  on  disc 
  243. until you save the revised file. If you are in a sub-file then the record is 
  244. deleted from the sub-file only. 
  245.  
  246.  
  247.  
  248. Insert 
  249.  
  250. You can only add new records if you are in Index 0. The program makes  space 
  251. for  a  new record to immediately follow the record you had been viewing. If 
  252. by so doing it would lose the last record in the file you will be warned and 
  253. given  the  option  to  abort  the  insert  routine.  The new record is then 
  254. presented as a blank record on screen - i.e. made up of asterisks - and  you 
  255. must  then  select  the  Alter box (explained below) to enter details in the 
  256. fields. This is important because if the first record is left with a leading 
  257. asterisk,  then  data could be lost after saving. (See the note on saving on 
  258. page 3 for further explanation.) 
  259.  
  260.  
  261.         - 4 - 
  262.  
  263.  
  264.  
  265.  
  266.    Maxifile-3 
  267.  
  268. Main File 
  269.  
  270. DO NOT CONFUSE THIS with Main Menu! This enables you to move up a  level  in 
  271. the Indices. Thus if you are in Index 1, this will move you back to the Main 
  272. File which is Index 0. If you are in Index 2 then you will move to Index  1. 
  273. Whatever  index  applies,  you  will  be  returned  to  the  Main Menu after 
  274. selecting this choice, but remember you are  now  in  a  higher  index  than 
  275. before  (unless  of  course  you  were  already in 0!). The opposite of this 
  276. selection can only be achieved by using the menu button on the mouse. 
  277.  
  278. Sub File 
  279.  
  280. This is not the true reverse of main File because it  automatically  assumes 
  281. you  wish  to set up a new sub-file. NB: Once you have selected this option, 
  282. you have lost your previous subfile at the next lower level if if previously 
  283. existed. 
  284.  
  285. It  may  help to understand how this part of the program is devised. You are 
  286. given an opportunity to set two conditions, but each  condition  is  set  up 
  287. separately,  and  only  then do you tell the program how you wish to combine 
  288. them. You do not have to set both conditions, and the program deals with the 
  289. first  condition  completely  before  it  asks  if  you want to set a second 
  290. condition. 
  291.  
  292. To set up a condition you must first identify the field it relates  to,  and 
  293. then  the string within that field with which a comparison will be made. You 
  294. may then require the field in each record to be greater than  or  less  than 
  295. the  chosen  string,  to contain the chosen string, or to exclude the chosen 
  296. string. Following this choice you are then asked if you  want  to  impose  a 
  297. second condition. 
  298.  
  299. If  you  choose a second condition then it is set in exactly the same way as 
  300. for the first, but having set up the condition you are then  asked  how  you 
  301. wish  to  combine them. The first option is to combine the two conditions so 
  302. that all the selected records of both operations are combined together - the 
  303. Inclusive  Or.  The  second  'Not Both' is the Exclusive Or - Condition A or 
  304. Condition B but not any records that are included in both. Only both is  the 
  305. logical  AND,  and  sets  up  the  sub-file  with  records that satisfy both 
  306. conditions. If you are familiar with set theory a venn diagram may help! 
  307.  
  308. This method of creating a sub-file should enable all two-condition tests  to 
  309. be  satisfied.  If  you  need  to  impose  a  third condition, then set up a 
  310. sub-file of the sub-file - this is what Index 2 is there for. 
  311.  
  312. Sort 
  313.  
  314. This routine enables you to  make  a  primary  sort  on  one  field,  and  a 
  315. secondary  sort  on a second field if required. You may sort in ascending or 
  316. descending order. The coding is based on a simple bubble sort,  but  on  the 
  317. Archimedes this still gives an acceptable speed for most purposes. Note that 
  318. the sort only applies to the current Index. 
  319.  
  320. Go To - Including Replace 
  321.  
  322. At its simplest you select 'Number of Record Required' and enter the  number 
  323. of  the  next  record  you wish to view. This is particularly useful to move 
  324. about quickly in a large database rather than going through one at a time. 
  325.  
  326.  
  327.         - 5 - 
  328.  
  329.  
  330.  
  331.  
  332.    Maxifile-3 
  333.  
  334. The 'Field search' option has two purposes. You can use it simply  to  reach 
  335. the  first  record  with the field containing the chosen string by selecting 
  336. 'View' - but that is all it does. Remember that this is  essentially  a  'go 
  337. to' routine, but if you want ALL the records that contain the string you can 
  338. set up an appropriate sub-file. 
  339.  
  340. There is however a much more important replace option linked to Field search 
  341. which  will  replace  all  occurrences of the chosen string with a specified 
  342. second string. 
  343.  
  344. Print 
  345.  
  346. This enables you to obtain a printout of the record currently displayed.  No 
  347. choices  are given, and it always prints in block rather than column format, 
  348. but it does date the printout and record the file name and record number. 
  349.  
  350. Main Menu 
  351.  
  352. Self-explnatory, really! 
  353.  
  354. Alter record 
  355.  
  356. This is only selected using the SELECT mouse button on the black  box  close 
  357. to  the  top  of  the  screen. It is however the main method of entering new 
  358. data, and it expects you to enter information consecutively into each  field 
  359. in  turn.  At  the  start the first field is hilighted and the length of the 
  360. field is picked out by a white line. If you type beyond this, the entry will 
  361. be  truncated  to  the  maximum  length.  When  you  press  return, you will 
  362. automatically move to the next  field,  and  so  on  until  all  fields  are 
  363. completed.  If a field already contains correct information, pressing return 
  364. on its own will restore the original contents. 
  365.  
  366. Alter a Field 
  367.  
  368. Fine adjustment or the complete replacement of just one field could be  done 
  369. using  the  Alter Record routine, but this is not always convenient. You may 
  370. for example wish to keep on screen the  existing  field  contents  and  just 
  371. modify  them  slightly.  To  do  this  press  the ADJUST button on the mouse 
  372. against the field name. The name will change colour, and a correction window 
  373. appears at the top of the screen containing the field contents. 
  374.  
  375. You  can  alter the contents of the window using the cursor keys to position 
  376. the cursor, or using SELECT on the mouse to position the  cursor  where  you 
  377. need  it.  If the field is too long to fit in this window, then you must use 
  378. the cursor keys to move the hidden part into view. At  the  cursor  you  may 
  379. type  in new text (which pushes old text to the right, but may loose the end 
  380. of the contents that no longer fit within the field length), use  DELETE  to 
  381. delete  left,  use  COPY  to delete right (i.e. above the cursor), CTRL-U to 
  382. delete the whole field content, or ESCAPE  if  you  decide  to  abandon  the 
  383. correction!  RETURN  however will replace the field content with the revised 
  384. entry. 
  385.  
  386. Move into an existing Sub-File 
  387.  
  388. Use the MENU button on the mouse to select the  next  Index  down,  assuming 
  389. that it has already been defined. This will return you to the Main Menu, but 
  390. in the new Index. 
  391.  
  392.  
  393.         - 6 - 
  394.  
  395.  
  396.  
  397.  
  398.    Maxifile-3 
  399.  
  400.  
  401. Improvements 
  402.  
  403. No  software  is  complete, and there are several enhancements that could be 
  404. made to this program. Some are listed below. Offers to write the appropriate 
  405. routines would be welcomed! 
  406.  
  407. I  would  like  to  include  some  arithmetic facilities, chiefly an average 
  408. routine and a total routine. 
  409.  
  410. There should be a routine to  add  extra  fields,  or  to  delete  fields  - 
  411. particularly from sub-files. 
  412.  
  413. Other routines to convert data into an InterWord file which can then be used 
  414. for mail merging (on Masters and Compacts, anyway) already exist. A  routine 
  415. could be written however to at least print envelopes! 
  416.  
  417. How  about  providing alternative layouts of the Record Screen? Possibly not 
  418. showing all fields? A constraint here is the file  storage  format  on  disc 
  419. which  has  deliberately  been  kept  compatible  with earlier versions, but 
  420. screen formats could possibly be saved separately. 
  421.  
  422. Print formats designed on screen. 
  423.  
  424. This is not a RISC-OS program - will MAXIFILE-4 be the next step? Not unless 
  425. there are more rainy days than usual, or someone writes it for me! 
  426.  
  427.  
  428.  
  429.  
  430. CALW 
  431. April 1990 
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.         - 7 - 
  460.  
  461.  
  462.  
  463.