8-Bit Software Online Conversion

1 DFS 0.90 Strange effects are sometimes encountered when using DFS 0.90 with Viewstore: When using multiple surfaces the disc catalogue can be written to an incorrect surface. This is manifested by the 'Disc changed' message on returning to command screen followed by drive 0 apparently being overwritten with the files from drive 2. Some problems can occur when building indexes. The solution is to upgrade to Acorn DFS 1.2, 1772 DFS or ADFS. 2 LABEL To enable Utility Label to prompt for use of select file you need to prepare a patch file as follows: Type: *BASIC ?&2800 = &FF *save patch 2800 + 1 Then immediately before using utility Label enter: *Load patch 50 Label with then give the 'Use Select file (N,Y)' prompt. 3 Entering records On Viewstore 1.0 it is good practice when entering record to frequently force Viewstore to write the records to disc. This can be done by pressing CTRL and DOWN ARROW. This will write all of the new records safely to disc and reduce data corruption problems. 4 REPORT format file prefix On Viewstore 1.0 different prefixes are required at different times when using report format files. When editing report format files the format file is treated as a database and uses the Data prefix. However, when using the report format file in the report utility it is treated as a format file and so uses the Format prefix. 5 Running out of room in REPORT Report format files can grow very large which can cause memory problems when using them in utility report. Their size can be significantly reduced by running them through utility Convert after editing them. In convert reply as follows: Use select file (N,Y)? N Field 1? * RETURN Field 2? RETURN Record size? +20 New filename: r.newfilename 6 Minimal space after setup In Viewstore 1.0 it is occasionally possible for the Space field at the top of the database display to be a small number eg 11 rather than the several thousand bytes which it should be. This can be rectified by making an entry eg +30 in the record size field in the database header. 7 Indexes on entering data Remember to index by entry when entering new data. This gives faster response tines and reduces the likelihood of index corruption on an unexpected error like disc fault. 8 Database drive Remember not to leave any files after the data file on the data drive. This reduces Can't extend problems on DFS. 9 F.REPORT Remember to copy the special format file F.REPORT from the utilities onto your format file disc before editing report format files. 10 Selecting on blank fields When using Select you can match a blank field by giving the criterion field ="" 11 Importing corrupt databases If a database is corrupted for any reason, for example if you lose the end marker or get 'Bad File' you can generally recover all or almost all of your data by importing the database into another file. This is often much quicker than retyping although you can, of course, refer to your backup. 12 When using ADFS with Viewstore The error COMPACTION REQUIRED ON CHANNEL 57 can be encountered. ADFS, if extending a file must keep the file contiguous. For example, if there is no space after the file, it copies the file into an area where there is more space. The free space on the disc must be larger than the file being expanded. SOLUTION Copy the large file onto a blank disc. Delete the file from the main disc. Compact the disc. Copy the file back. It should now expand OK - BUT in an application such as this it is very sensible if largest files kept on a disc on their own. 13 SELECT syntax Remember to use brackets and delimiters in select criteria. For example: rrp/VAT=number and =10000 is unlikely to have the desired effect. You should enter: ("rrp/VAT"=number) and (" "=10000) to be completely ambiguous. 14 Sort memory Before running utility select to sort a file on the Model B remember to enter mode 6 or mode 7 to give the greatest available memory for the sort. 15 Highlighting part lines in REPORT headers To highlight part of a line in a report header do the following. Type the header line into the report and insert a single @ character at each point you want the highlighting to vary. Then in the field list enter a comment specifier for each @ and succeed the comment specifier with the highlight codes. For example: Type Half1 Field list H Ordinary@Bold@Ordinary 333,@1,333,@1 C Press RETURN When Viewstore reaches the first @ it sends the first three highlight 3s to the printer driver which will switch on emboldening. It then replaces the first @ by comment 1. The user is prompted to press RETURN for the first comment which will fill the comment with spaces (one in this case). The word underlined will then be printed in bold before the emboldening is switched off and another blank comment is printed. 16 Editing REPORT format files Report format files can be edited in the View word processor. Read the report format file into View and insert a ruler at the top of the file which has no right margin and tab stops set wide enough to align the field in columns. Now edit the file. Be careful to keep the fields separated by the correct number of tabs and make sure that the lines do not exceed 132 characters. Before saving the file delete the ruler at the top. Finally import the file back as a database, field separator being 9 and record separator being 13. 17 Final REPORT editing Reports can be edited by spooling the report to disc, reading into the View word processor, editing and printing from View. 18 Case sensitivity in Watford DFS Some versions of Watford DFS do not allow a mixture of cases in directory names. It is necessary to ensure all filenames specifications are in the correct case. In particular utilities should be renamed from directory "u" to "U". 19 Filesizes and Utilities The Viewstore utilities all assume maximum filesizes of 65536 when performing calculations on filesizes. In particular giving a size n of more than 65536 bytes to reserve in the setup utility caused Viewstore to reserve n modulo 65536 bytes. So specifying 70000 bytes will actually reserve 4464 bytes. This does not limit either the size of your database file or the sizes of your index files. 20 Bytes to reserve - Load time tradeoff On loading a database Viewstore quickly loads the format file, opens up the data file and reads it from the end of the file backwards to the end of the data marker. If there is a lot of space at the end of the file this may take a little time. Consequently unless you need space reserved at the end of the data file (if you are using a single DFS surface) it is best to reserve 0 bytes when setting up the database. 21 Writing utilities It is possible to write extra utilities for use with Viewstore. However, this should only be attempted by experienced 6502 programmers who either require a utility for special use or who are planning to exploit the utilities commercially. Acorn have no copyright restrictions on others selling their own Viewstore utilities. 22 Copyright All of the code and documentation supplied with Viewstore is subject to English copyright law. You are not allowed to copy the Viewstore EPROM without explicit permission from Acorn. You may copy the Viewstore utility disc for your own use. 23 This is a BASIC utility that enables you to append one database to another in Viewstore The simple format of Viewstore database files enables simple manipulation by programs written in BBC BASIC. For example, the following program appends one database file to another. NOTE: the field order within records of both databases should be the same for sensible results. 10 INPUT "File 1",file1$ 20 INPUT "File 2",file2$ 30 one=OPENUP(file1$) :REM BASIC 1 users should use OPENIN 40 two=OPENIN(file2$) 50 REPEAT UNTIL BGET#one=1 60 PTR#1=PTR#One-1 70 REPEAT 80 byte=BGET#two 90 BPUT#one,byte 100 UNTIL byte=1 110 CLOSE#one 120 CLOSE#2 24 Obtaining Reports from a database (This is an example) Whether or not you have prepared a Select File when running the SELECT utility, you can produce a simple report on screen of the first 80 characters of each record, or if you choose the printer option, you can specify the width of the paper, page length and whether or not single sheets are required. The simple report will give all the records or a selection, depending on whether a Select File is used. If you follow the Report Utility routine through without using a Report Format File (answer N to the prompt "User report format file N,Y?") you will see that this 'simple' report is not particularly suited to the chosen layout of your data in th name and address file. The key factor here is that the records are shown in the spreadsheet format, and are thus limited to the width of the screen (usually a max of 80 characters), or the specified paper width if you choose the printer option, so once again you are not going to see all the data from the database, there are some sorts of database for which this type of report is perfect (such as accounting applications) where you might use a spreadsheet style display for the database and limit the width to 80 characters anyway, in which case this form of reporting is perfectly satisfactory. The above is suggested as a guideline and we hope that this will enable you to setup a report specifically for your printing requirements. 25 Printing labels from a Viewstore database using label utility The Label Utility enables you to extract information from a database for printing labels. First load the database from which you want to print the labels and ensure that the computer has been prepared for printing. You will notice on the screen after loading the database: Editing D.(database filename) Format F.(format filename) Then type: UTILITY LABEL (press return) The Utility Label program will ask you various questions that you should answer as below: Use select file (N,Y)? (type N if this applies to the whole database or Y is to select file) Screen or Printer (S,P)? P (RETURN) Label height (lines)? 6 Lines between each label? 3 Width of label? 25 Characters between each label? 6 Number of labels across the page? 3 Line 1? ) Line 2? ) enter the field name or names from which information Line 3? ) has to be extracted. Where there is more than one field Line 4? ) name required this must be separated by commas Line 5? ) eg Name, Address Line 6? ) (press RETURN) 26 Using Viewstore convert 1. 'Convert' converts an existing database, or a SELECTED subset into a new file. To add a space to an existing file use: Use Select file (N,Y)? N Field 1? * : Filename? (a new name) Record size: +100 Then use LOAD (new name) (old name) to use the new database, with the old format file, or rename the (new name) to (old name) (backing up the old file first!). 2 Printing out some fields or a file is done with the REPORT Utility - see the manual for details. 3 Furthermore, if you want to pass an alphabetically sorted database to View it is done by SELECTing the fields you want, sorting on the appropriate field, then using CONVERT, this time with a select file, to produce a new database in sorted order, which can be passed to View. 27 This applies to View and Viewstore (PDG) Although View has only two highlight codes these can be redefined using HT code in "Edit command" (Shift F8) to make use of other features available on the printer. The actual values associated with the highlight codes can vary from 128 to 148. If you want to access extended characters you use HT 2 130. This is entered in your View document using Shift F8 (Edit command). However, you should enter the appropriate codes in response to the printer initialisation question in the PDG. For example: In View to change font you would enter *-- (means Highlight 2,1,1). View then sends to the Printer Driver 130 128 128 codes to switch to the new font. With Viewstore you would need to put these codes in REPORT FORMAT file 3 1 1. Viewstore sends to the Printer Driver 127 + number (130 128 128). 28 Viewstore import procedure - Viewstore to Viewstore CHAIN "IMPORT" Question Input Source file D.(filename) Destination file :(drive number).D.(new filename) Position in file where data starts 0>RETURN< Record Separator 13 (carriage return in Viewstore) Appears before first record N Appears before last record Y Field Separator 9 (tab character in Viewstore) Before first character N After last character N End of file marker 0 Is data reserved N (it is in database) Trailing character to skip N Record size <RETURN>