%OP%JUY %OP%WRY %OP%TM1 %OP%FM2 %OP%BM1 %OP%LM5 %OP%HE/%H2%Z88 Users' Club Software Library%H2%/ %OP%FO/%H2%Z105%H2%//@P@/ %CO:A,12,70%%C%%H2%INVENTORY version 2 DATABASE%H2% %C%%H2%INSTRCTIONS FOR USE%H2% %JR%INVENTORY is a classical database in which information is arranged as %JL%if on the cards of a card index. Each card contains all the data %JL%relating to a particular subject and is called a RECORD. Each Record is made up of a number of specific items or FIELDS. %JR%Theoretically there is no limit to the number of Fields per Record, %JL%but each Field is limited to 254 characters. The only practical limit %JR%to the number of Records is the memory area available to BASIC, which %JL%in this program is about 26K, (equivalent to 800 Records in STOCKLIST %JR%or 120 in BOOKLIST examples). A set of Records becomes a FILE which is identified by a FILENAME. %JR%As its name suggests, INVENTORY was first designed to be used with %JR%discrete data such as address, stock or price lists where the number %JL%of fields was of the order of 4-68. This was because of the %JR%limitations of the Z88 display. However, with careful management and %JL%because of the large field size it can also be used for applications %JR%such as book or record lists which might include a brief summary or critique of the contents. %JR%As an aid to searching, Records may be allotted three levels of %JL%activity, Neutral (as when first written), Active (as when selected) and Hidden (as when rejected or in preparation for deletion). INVENTORY REQUIRES A MINIMUM OF 128K RAM CARD IN SLOT 1 Answers to prompts should be typed in capital letters. %JR%Two short example Files STOCKLIST and BOOKLIST accompany the program, as well as a start-up CLI file I.CLI %H2%START UP%H2% %JR%Select BASIC from INDEX, then type CHAIN "Z105B" [ENTER] %JL%Alternatively, select the Filer with []F, tag the CLI file Z105C, %JR%then select EXECUTE (or <>EX). BASIC should then be selected and INVENTORY2 CHAINed automatically. %JR%1. Type Y to start a new Database. Give the number of Fields, %JL%followed by the name and type of each separated by a comma; eg. %JR%NAME,C. Fields are C for character only; N for numerical data which %JL%might be required for calculations; D for dates. Dates must always be %JR%written as 31/08/89 (8 characters), although the separator may be any %JL%of /,. or space. Initially space will be reserved for 20 Records (see below). %JL%2. At start, to Load an existing File, type N then give the Filename. %JL%Files are automatically loaded from or saved to the default RAM %JR%unless specified in the Filename. Every time you Load a file the %JL%maximum number of Records will be increased by 20. When you have %JR%filled these new Records, you will be asked to Save and ReLoad in order to free space for another 20 Records. %C%%H2%MENU OF OPTIONS %JR%The header shows the File name, number of records, and date of last %JL%update. Also shown is the size of the File in bytes. (see Save for %JL%notes regarding the memory space available for expanding files, %JR%which is influenced by the number of Files stored in the :RAM.1 slot as well as the size of the current File). %JR%%H1%1. Write:%H1% Opposite each Field Name type in your data. The choice of %JL%case is yours, but remember to reselect CAPS when you have finished. %JR%You may enter up to two and a half lines of text (to the end of the %JR%third line) in any field. Each Fieldname is terminated by the type as %JL%a reminder. Fields may be left blank by pressing the [ENTER] key. %JR%Errors can be corrected by selecting Edit from within the Inspect %JL%option. new Records are automatically given N status. Deletion is made through the Save option only. %JL%%H1%2. Inspect:%H1% You have the chance to limit your inspection to A, N or %JR%H records, in which case the program will search for the first. Give %JL%the number of the record you wish to start from. It will be %JR%displayed. Select N or P to move forewards or backwards through the %JL%File. You will find that Record 0 contains the Field names. Records can be marked Manually by selecting M or edited from E. %JR%%H1%3. Print:%H1% Allows you to define the layout of Fields on the screen or %JL%printer in the manner of labels. Thus an address list with Fields 1 SURNAME, 2 INITIALS, 3 PHONE NO., your entry could be:- This would print out as: %JR%Fields may be used in any order and more than once. However they must %JL%be entered in the order in which they would have been written on a %JR%typewriter, starting at the left of line 1 and progressing to the %JL%right, then onto line 2. You cannot go backwards on the same line to %JL%col 1 after col 10 or to line 1 after line 2. The first line and %JR%column must be 1. The format is automatically saved to File as soon %JL%as it is completed, erasing any previous format. Any existing format %JR%is shown at the beginning of the option as a string of numbers %JL%separated by commas. Press []+P to initialise the printer if you wish %JR%the results to be on paper, otherwise the results will appear on the %JL%screen only. Thus the Print option can be used in a similar way to %JR%Inspect to search through the file, but displaying one or two Fields instead of the whole Record each time. []-P disconnects the Printer. %JR%%H1%4. Copy:%H1% Used to make identical replicates of any Record. When %JL%Records are similar it may be easier to copy Records and then Edit %JR%the Fields that differ, than to write each Record completely, %JL%particularily if there are a lot of Fields and differences appear in only one of them. %JL%%H1%5. Count:%H1% Runs through the entire File counting the number of %JR%Hidden, Neutral and Active Records. Also produces a total for each N Field. %JL%%H1%6. Search String:%H1% Looks for a string of characters anywhere in a %JR%record, or in a specified Field which is quicker. Matching Records %JL%will be marked H or A as you choose. If the search is restricted to %JR%Active Records only, those that do not match will be redesignated N. %JL%this allows sequential selection; eg. a first search for "London" followed by "Jones" would result in a list of all Jones's in London. %JR%You may elect for each Record to be displayed as it is found, and at %JL%the end you may branch directly to Inspect without going through the Menu. %JR%%H1%7. Search Date/Value:%H1% Similar to 6 but is restricted to D or N type %JR%Fields. Select the Field to be searched, then the target Date or %JL%Number followed by =, < or > depending on whether you are looking for %JR%Records that are equal to (=), are less than (<) or greater than (>). Selected Records are marked Active, there is no other choice.. %JL%%H1%8. Calculate:%H1% Allows calculations to be made on the Fields within each Record, but not between Records. There are two logic sequences:- %JL%1. Fa = Fb funct. const. %JR%2. Fa = Fb funct. Fc %JL%Fields a, b and c can be the same; thus 4=4*4 would be the equivalent %JR%of squaring the value of Field 4; or 6=3/4 divides Field 3 by Field 4 %JL%and puts the result into Field 6; and 3=3*1.10 increases the value of Field 3 by 10%PC%. %JR%%H1%9. Save:%H1% Saves the File under its existing Filename or under a new %JL%name. Active records alone may be saved or retained marked as Active, %JL%and you have the option to abandon all Hidden Records. This last %JR%option removes the Records entirely, and shortens the File by the %JL%equivalent number of Records. It is the only way of deleting Records. %JR%Saving Active Records alone provides a means of creating sub-files of %JL%selected Records for a different database. Each File will be date-stamped. %JR%The amount of memory available in RAM.1 for storing your file is %JL%sometimes difficult to determine. This is because BASIC grabs up to %JR%40K bytes for its own use without telling you. Thus if you have other %JL%files such as Pipedream files stored there, or have other BASIC %JR%programs resident under Suspended Activities there may be less room %JL%available than you think. If the new file cannot fit into the space %JL%available, then you will be told, and the Save will be abandoned. %JR%Your only solution is to return to the Filer and move some files to %JL%another RAM, or save into the RAM in slots 2 or 3, by including the Device in the filename (e.g. :RAM.2/Mydata). %JL%%H1%10. Load:%H1% Clears all existing data and Loads the chosen File. Each %JR%time a file is Loaded you have the chance to increase the number of %JR%Fields by one. This can be handy if you find that you have forgotten %JR%an important item of information, or want a spare Field to store the %JR%result of calculations. The new Field will of course be empty. The %JL%top limit of Records in your File will also be increased by 20. If %JR%you fill these up Save the File then Load again, and there will be %JL%room for 20 more records. This system has been adopted to conserve memory space and to increase security. %JL%%H1%11. Neutralise:%H1% Used to reinstate Hidden or Active Records to the %JL%Neutral state. You will need to use this option before you instigate a new search. %JL%%H1%12. QUIT:%H1% Tidies up, closes all files and clears all memory. Should %JR%be used to end a work session to avoid leaving open Files in memory which may cause trouble later. To restart type RUN [ENTER]. %JR%If the program crashes and you see a BASIC error message type GOTO MENU [ENTER], and you should return to the Menu without loss of data. %C%%H2%INVENTORY and INVENTORY2 %JR%Files which have been produced by INVENTORY are compatible with %JL%INVENTORY2. But the first time you load an INVENTORY File into %JR%INVENTORY2, you will find that the first line of the MENU screen will %JL%display the filename after the "updated" message instead of a date. Once the file has been Saved, this anomaly will disappear. %C%%H2%INVENTORY 2 AND PIPEDREAM The Files used by INVENTORY 2 can be written and read by PIPEDREAM. %JR%If you wish to do this it is important to get the structure of the %JL%file correct otherwise data will get written to the wrong Fields. %JR%There follows a copy of the beginning of the example file STOCKLIST. %JL%The contents of the file are in the left column, with explanations to the right. The most important rules are:- %H1%File Data%H1% STOCKLIST 6 4 2,1,1,1,1,10, ITEM~C TYPE~C NUMBER~N UNIT COST~N PUR DATE~D VALUE~N #1 N Bolt 2 in 250 0.10 23/10/89 #2 N Washer etc. %C%%H1%Final Remarks%H1% %JR%I have enjoyed writing the INVENTORY programs, so I hope that you %JL%find this updated version useful. In order to keep its size %JR%reasonable the program is not fully "idiot proofed" although I have %JL%built in checks against the most obvious mistakes. Errors due to %JR%miskeying will usually switch straight to the MENU. If you do provoke %JL%an Error (the > sign) type GOTO MENU [ENTER] and with reasonable luck %JR%you should find yourself back at the MENU without any damage. %JL%Pressing [ESC] key will return you to the MENU anytime, but may mess up the data so I don't advise it!. %JR%If you find any serious bugs or niggles, or have suggestions for %JL%further additions, please write. It would be nice to get some %JL%feed-back. However I'm resisting the temptation to add a sort routine as I'm not convinced that it is really necessary. %JL%Lastly, my thanks to those patient users who pointed out bugs in the original program, and who made suggestions for improvements. Good luck and have fun! 11th. July 1991 %CO:B,12,60% Field, Line, Column 2,1,1 Field, Line, Column 1,1,6 Field, line, Column 3,2,1 Field, Line, Column 0,0,0 J. Bloggs 01 234 8765 1. Files must be saved and loaded as Plain Text 2. Each Field must start on a new line. %H1% %CO:C,12,48% ...Field a equals Field b +,-,*,/ a constant ...Field a equals Field b +,-,*,/ Field c %H1%Row%H1% 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 etc. %CO:D,12,36% File name (must be written) Number of Fields Current number of Records Print Format - or enter 0 Name and type of Field Start of Record 1 Mark on Record (New record = N) Data in Field 1 do 2 do 3 do 4 do 5 do 6 (blank) Start of Record 2 Mark on Record 2 Data Field 1 etc. %CO:E,12,24% 3 zeros ends the format %H1%Notes%H1% do do do do do John B. Davies (1388) 57 North Parade Hoylake Merseyside L47 3AL U.K. %CO:F,12,12% constant 1 2 3 4 5 6