----------> Summary of Examples Disk <---------- ************* * * * Surgery * * * ************* This database keeps a list of patients to "Taurus Private Surgery", and each patient has their own appointment records. Each appointment contains details of previous visits (date, time, doctor seen, treatment etc.), and fields for the next date and time. This is used to send out reminders. A charge is also stored,so that payments can be traced. Thus this single project can be used for simple accounting and appointment reminders. Project Name - SURGERY Datafiles - PATIENTS APPOINTMENTS Path Type Index SYSTEM_TO_P SYSTEM SURNAME (Non-Unique) P_TO_A RELATIONAL NHS_NUMBER Sorted on I_NUMBER Streams Attached to Function TITLE Checks for Mr, Mrs or Miss - defaults to Mr. SURNAME, FIRST_NAMES, All converted to PROPER. ADDRESS1-3 ADDRESS4 Converted to UPPER (this is the country). NHS_NUMBER Converted to UPPER (numbers say the same). DOCTOR Adds "Dr" before name, converts to PROPER. PAID Checks for Y or N - defaults to N. Reports REMINDERS - Checks all records for future appointments up to a given number of days ahead. PAYMENTS - Checks for unpaid accounts and issues a bill. Notes Because NHS_NUMBER is the system index, there is no problem about repeating names. The path SYSTEM_TO_P is used so that the patients are indexed on SURNAME, and the relational path P_TO_A sorts the appointments in date order. **************** * * * Tauruscard * * * **************** This simple non-relational database is used to store details of "Tauruscard" users - their name, credit limit, expiration date etc. - all but one of the fields has a stream which loads an Acom program to check the input. Project Name - T.CARD_PASTE Datafiles - TAURUSCARD Streams Attached to Function NUMBER CHecks that the number is less than 999. EXPIRES Makes the expiration date one year after VALID date. MR_MRS_MS Checks for Mr, Mrs or Miss - defaults to "". INITIAL_NAME Converts to PROPER. LASTNAME Converts to PROPER. CREDIT Checks for 25, 50 or 75 - defaults to 0. Reports T.CARD-REPORT - Prints out a report of all Tauruscard users Notes The whole project was created by someone with under a weeks experience ********************* * * * Market Research * * * ********************* This project consists of a database of products (soap powders), each of which has its own surveys, showing details of the person surveyed and the percentages they awarded for value, performance and presentation. These three are combined into an overall percentage. The results can be compared in a report which prints out all the surveys and shows the average percentages. Project Name - M_RESEARCH Datafiles - PRODUCTS SURVEYS Path Type Index PR_TO_SU RELATIONAL PRODUCT Sorted on SURVEY_NO Macro The macro in the surveys screen is used to put the age and income into groups, check for male/female and married/single, and calculate the overall percentage. This is used instead of a series of streams, as the macro only needs to be run once unless data has been subsequently changed). Clicking on the icon loads "CALCS", an Acom program which does the above calculations. Reports ALL_SURVEYS - Prints out the details of each product, and a list of all its surveys. It then prints the average values of the surveys shown. Notes This is a simple relational project, which uses a macro as it is faster than using several streams. The details are put into groups to make analysis and comparisons easy. @ of databases (and he was only sixteen !). ************************ * * * Customer Invoicing * * * ************************ This project keeps a record of customers (name, address, credit limit etc.) and their related invoices. The invoice has space for two items (each with a quantity, description, unit cost and total) and a unique invoice number. The sub-totals and grand total are calculated automatically. Project Name - INVOICING Datafiles - CUSTOMERS INVOICES Path Type Index SYSTEM_TO_C SYSTEM C_SURNAME (Non-Unique) C_TO_I RELATIONAL C_SURNAME Sorted on I_NUMBER Streams Attached to :- Function C_TITLE Checks for Mr, Mrs or Miss - defaults to Mr Also converts the first letter to upper case, and the rest to lower (i.e. converts to PROPER) C_SURNAME Converts to proper (e.g. "sMIth" becomes "Smith") I_PAID Checks for "Y" or "N" - defaults to "N" I_TOTAL1, Calculates item total (I_PRICE x I_QUANTITY) I_TOTAL2 I_GTOTAL Calculates grand total (I_TOTAL1 + I_TOTAL2) I_TERMS Copies credit terms (C_TERMS) onto the invoice Reports STATEMENTS - Prints out all invoices for a particular customer from a specified date. OUTSTANDING - Prints out and sums all outstanding invoices. Notes The system index for the customer datafile is C_DUMMY, but this is not displayed on screen. There is a second index (defined by the path SYSTEM_TO_C) which allows C_SURNAME to be non-unique, because if C_SURNAME had been the system index it would have to be unique. Thus C_DUMMY is used as a "dummy field" to allow us to have customers with the same surname. C_DUMMY is automatically created as a string of the date, time and a random number, which ensures its uniqueness. The background screen for the invoice was drawn in a standard graphics package, then loaded into Pasting as a clip image. All that need doing was to move the field prompts to the correct places. ************ * * * Trivia * * * ************ This is an example of a game written mainly in the Acom language but using a database to store all the questions and answers using a 'multi access' index in order to group the questions by their appropriate topic. Extra questions can be added through FILING by opening the project called triv_mast and entering data in the required format. Project Name - TRIVIA Datafiles - TRIV_MAST Path Type Index TRIV_M SYSTEM TOPIC (Non-Unique) Streams Attached to :- Function project The whole acom program is stored within the master system stream Notes This program is executed by the use of streams in the project description hence all that is required to run the program is to open the project called 'Trivia'. This program uses the message command to show how to read from the keyboard and how to interpret mouse messages and the associated coordinates. Instructions for the program are explained when the program is running. All that has to be done is follow the instructions and get the answers correct because three wrong means the end of the game. At the end you will be presented with a graph showing how well you performed in each topic. Remember you only have a limited amount of time before you automatically get the answer wrong at which point the computer will choose another question from the same topic. ************* * * * Animate * * * ************* This Acom program demonstrates the versatility of the CLIPPIC command - using it to move, copy, expand and contract the picture (about the only use it is not put to is copying from one window to another). By different uses of the CLIPPIC command, the picture is first moved to the side of the screen, expanded along the x-axis,compressed along the y-axis, moved (creating garbage in its path and then clearing it), compacted and finally copied to random positions. The overall effect is to animate the picture. **************** * * * Graph-Plot * * * **************** This program allows virtually any function to be drawn between the limits given, by using the EVALUATE function. The program calculates the maximum and minimum y-values, and then scales all the values to fit on the screen. Any Acom function can be put in the formula, eg. SIN(X*X*LN(X))-SQRT(X+ATAN(X-PI))/X. Although there is a fair amount of math in the program which scales the x- and y-values, most of the calculation is done by the EVALUATE statement. ************ * * * Circle * * * ************ This short Acom program generates a cyclic pattern of lines by using the MOVE and DRAW commands. It opens its own window for the input variables, which it then closes and uses the default screen to draw the pattern. It also uses its own sub-routine to draw the circle at the start. ********** * * * Menu * * * ********** This program simply prints some program descriptions on the screen and the waits for input from the user, at which time the load command is used to execute the relevant program from the disk. When the called program has completed the it in turn calls the menu so that another choice may be made. ************** * * * Ex_Graph * * * ************** This routine draws an expanding graph of fixed data that can be substituted with you own data if used within your programs. The graph is simply draw multiple times getting larger each time and automatically scaling itself. Refer to the graph command in your manual for details of each parameter. ************* * * * Clipper * * * ************* This program shows how to display IFF images and move blocks of the image between current Acquisition windows using the messages returned from the mouse as a method of detecting which portion of the picture to display. Notice that the windows are in a different resolution and have a different number of colors. ************** * * * Graphics * * * ************** This is a mini paint package written in acom allowing you to do things like drawing line and boxes etc.it uses the Amiga's graphics commands extensively and is also a good examples of using the message command to get input from the mouse and keyboard commands. ******************* * * * Writetest, * * Readtest, * * Readnexttest, * * Deletetest * * * ******************* These four Acom programs are used to create, read and delete 1000 records. These operations are carried out on the currently opened datafile - so be careful! - it is best to use TEST_MAST which is set-up for this purpose (although any datafile with four alphanumeric fields can be used). Writetest creates the records with a unique number in field1, the AVAILable memory in field2, and a random number in field3 (field4 is left blank). Readtest reads the records in numeric order - 0,1,2,3,4 etc. It does this by "asking" for a particular record. Readnexttest reads the records in alphabetical order - 0,1,10,100,11 etc. The next record is read, and as the system index is alphanumeric, the records are read alphabetically. Deletetest kills the records (in numerical order). All of these programs have an error counter which returns the number of errors incurred during the test (each error is reported as it happens with a requester asking if you want to continue or abort), and times the whole operation. ************* * * * RImport * * * ************* This program is a demonstration of how to import information into a relational database from a non-relational database. The information is first imported into a non-relational database then by opening the project 'MNG' which has been set up by following the tutorial and running the program 'RIMPORT.ACOM' the data is transferred to the relational database.