%OP%JUY %OP%TM1 %OP%HM1 %OP%FM1 %OP%BM1 %OP%LM4 %OP%HE/%H2%Z88 Users' Club Software Library%H2%/ %OP%FO/%H2%Z105%H2%//@P@/ %CO:A,12,72%%C%%H2%INVENTORY DATABASE%H2% %C%%H2%INSTRUCTIONS 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 %JR%relating to a particular subject and is called a RECORD. Each Record is made up of a number of specific items or FIELDS. %JL%There is no limit to the number of Fields per Record, but each Field is %JR%limited to 254 characters. The only limit to the number of Records is the memory area available to BASIC, which in this program is about 50K, %JL%(equivalent to 1000 Records in STOCKLIST (Z105C) or 250 in BOOKLIST %JL%(Z105D) examples). A set of Records becomes a FILE which is identified by a FILENAME. %JL%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 of %JL%fields was of the order of 6-8. This was because of the limitations of %JR%the Z88 display. However, with careful management and because of the %JL%large field size it can also be used for applications such as book or %JR%record lists which might include a brief summary or critique of the contents. %JL%As an aid to searching, Records may be allotted three levels of %JR%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 Z105C (STOCKLIST) and Z105D (BOOKLIST) accompany the program. %H2%START UP%H2% %JL%Select BASIC from INDEX, then type CHAIN "LIBRARY/Z105B" [ENTER] (or %JL%CHAIN"Z105B" if you have already selected the LIBRARY sub-directory) or as appropriate if you have renamed the files. %JL%1. Type Y to start a new Database. Give the number of Fields, followed %JR%by the name and type of each separated by a comma; eg. NAME,C. Fields %JL%are C for character only; N for numerical data which might be required %JR%for calculations; D for dates. Dates must always be written as 01/08/89 (8 characters), although the separator may be any of /,. or space. %JR%2. At start, to Load an existing File, type N then give the Filename (including sub-directory, if applicable). %JL%Files are automatically loaded from or saved to the default RAM unless specified in the Filename. %P0% %C%MENU OF OPTIONS %JR%%H1%1. Write:%H1% Opposite each Field Name type in your data. The choice of case is yours, but remember to reselect CAPS when you have finished. %JL%You may enter up to two and a half lines of text (to the end of the %JL%third line) in any field. Each Fieldname is terminated by the type as a %JR%reminder. Fields may be left blank by pressing the [ENTER] key. Errors %JL%can be corrected by selecting Edit from within the Inspect option. new Records are automatically given N status. %JL%%H1%2. Inspect:%H1% Give the number of the record you wish to see. It will be %JR%displayed. Select N or P to move forwards 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 to col 1 after col 10 or to line 1 after line 2. The first line and column must be 1. %JR%The format is automatically saved to File as soon as it is completed, %JL%erasing any previous format. Any existing format is shown at the beginning of the option as a string of numbers separated by commas. %JL%%H1%4. Copy:%H1% Used to make identical copies of any Record. When Records %JL%are similar it may be easier to copy Records and then Edit the Fields that differ, than to write each Record completely. %JR%%H1%5. Count:%H1% Runs through the entire File counting the number of 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 %JL%record, or in a specified Field which is quicker. Matching Records %JR%will be marked H or A. If the search is restricted to Active Records %JL%only, those that do not match will be redesignated N. this allows %JR%sequential selection; eg. a first search for "London" followed by "Jones" would result in a list of all Jones's in London. %JR%%H1%7. Search Date/Value:%H1% Similar to 6 but is restricted to D or N type %JL%Fields. Select the Field to be searched, then the target Date or Number %JR%followed by =, < or > depending on whether you are looking for Records %JL%that are equal to (=), are less than (<) or greater than (>). Selected Records are marked Active. %JR%%H1%8. Calculate:%H1% Allows calculations to be made on the Fields within each Record, but not between Records. There are two logic sequences:- 1. Fa = Fb funct. Const. 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 are retained marked as Active, and you have the %JR%option to abandon all Hidden Records. This last option removes the %JL%Records entirely, and shortens the File by the equivalent number of Records. It is the only way of deleting Records. %JR%%H1%10. Load:%H1% Clears all existing data and Loads the chosen File. Each %JL%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 an %JL%important item of information, or want a spare Field to store the %JR%result of calculations. The new Field will of course be empty. %JL%The top limit of your File will also be increased by 20. If you fill %JR%these up Save the File then Load again, and there will be room for 20 %JL%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 %JR%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]. %C%INVENTORY AND PIPEDREAM The Files used by INVENTORY can be written and read by PIPEDREAM. %JL%If you wish to do this it is important to get the structure of the file %JR%correct otherwise data will get written to the wrong Fields. There %JL%follows a copy of the beginning of the example file STOCKLIST. The %JR%contents of the file are in the left column, with explanations to the right. The most important rules are:- %H1%File content 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 %H1%Final Remarks%H1% %JL%I have enjoyed writing INVENTORY, so I hope that you find it useful. %JR%In order to keep its size reasonable the program is not fully "idiot %JL%proofed" although I have built in checks against the most obvious %JR%mistakes. Errors due to miskeying will usually switch straight to the %JL%MENU. If you do provoke an Error (the > sign) type GOTO 500 [ENTER] and %JR%with reasonable luck you should find yourself back at the MENU without any damage. Pressing [ESC] key will return you to the MENU anytime. %JR%If you find any serious bugs or niggles, or have suggestions for %JL%additions, please write. It would be nice to get some feed-back. %JR%However I'm resisting the temptation to add a sort routine as I'm not convinced that it is really necessary. Good luck and have fun! 7th February 1990. %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 - Leave blank 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 %CO:F,12,12% 1 2 3 4 5 6