Epicure Distributed Database System
Database Report Generator (DBReport) Proposal
Cynthia A. Chopp
The purpose of this paper is to outline a design and propose an implementation strategy for the Database Report Generator (DBReport) of the Epicure Distributed Database System (EDDS) . The DBReport is a menu driven program designed for users to generate reports consisting of information from the EDDS. It will be developed using VAX C and will use Epicure Screen Management (ESM) and Database Serial Access (DBSA) routines. New routines similar to the DBSA search routine are being proposed to accomplish multiple searches of the database, and sorting returned information. The ESM routines will be needed to handle screen I/O, and the DBSA routines will be used to retrieve information from the database. The DBReport will run on both terminals and workstations and will have a standard Epicure interface for menus.
The DBReport contains eight main menu options from which users may make selections. The DBReport program will take selections made from the options and access report/search routines to retrieve database information of what the users want, then sort the returned information if the users choose so, and finally, output the values of the various properties, attributes, and keys chosen . The eight menu selections are SEARCHING KEYS, SORTING KEYS, REPORT CONTENTS, RUN OPTION, AUTOMATIC REPORTS, OUTPUT LOCATIONS, PRINT SCREEN, and EXIT PROGRAM, and are described in the following sections.
Users have the ability to search the entire database for specific information, sort the information returned by the search, display various database fields of devices that fit their chosen search specifics, and output this information to a file, screen or both. They also will have the ability to choose automatic reports already set up, allowing them to minimize menu selections. The following describes the eight main menu options which users may access.
The SEARCHING KEYS menu option is a list of searching keys in which devices can be selected by choosing specific data or information related to them. The maximum number of searching key selections is three. Next key (or secondary) information related to the searching key chosen, is unlimited, allowing users to have the ability of choosing multiple secondary keys and data. All searching key selections will be logically `and'ed together for the search, while all secondary and data key selections will be logically `or'ed together for the search. An example of a multiple secondary key selection with multiple data is the following: A searching key selection of crate, with a secondary key of reading, with a data selection of 2,3,4 for crate values, with another secondary key selection of setting with a data selection of 5,9,12 for crate values. Only one searching key was chosen -- crate, yet it contained multiple crate numbers for multiple properties.
When selections are made, a display on the right of the screen will verify what the users chose. Users will be allowed to delete selections without leaving the searching menu. When users are finished selecting search keys, they may leave the menu by choosing the menu option Ok. If users select the Cancel option, no changes to the searching keys will be saved, only the prior search keys selected will be valid. If users select three searches, a message will appear asking them if they want to Cancel any selections or Ok them.
The following is a listing of the SEARCH KEYS menu option along with a description of how searching input will be accepted. Please note that most of the static libraries shown are just a fraction of the complete listing.
Some of the search selections shown have `*', `**', or `***'. This means that not only will users be choosing a primary key to search, but also a secondary key of property, and then a specific field to the primary key as well. The following lists are secondary key selections related to their corresponding primary search keys. Please note that not all primary search key selections have secondary keys that are property lists. Most primary search key selections have secondary keys that are specific fields.
After selecting a search key, users will either choose a specific field from a static library, input the specific search field itself, or choose a particular property and then choose a specific field. If users choose the Cancel option from the SEARCHING KEYS menu, all search key selections made during that selection will be invalid.
The SORTING KEYS menu option is a list of properties, attributes, and keys by which devices can be sorted for a better formatted output. The maximum number of keys allowed to sort at one time is three. Depending on the returned collection size of the search, the most efficient sorting method will automatically be selected. This will aid in quicker response times. Each sort selection made will be displayed on the right of the screen, for verification of what users chose. Users will have the ability to change selections without having to cancel from the menu and reenter. Once done selecting sort keys, users may leave the menu by choosing the menu option Ok. If users select the Cancel option, no sort keys will be kept during that SORTING KEY selection, but only the prior sort keys selected will be valid. If users select the Cancel ALL Sorts option, all SORTING KEY selections (even prior sorting keys) will be eliminated until users choose them again. This allows users to not have any sort on their searched output. After users select three sorts, a message will appear asking them if they want to Cancel any selections or Ok them.
The following is a listing of the SORTING KEYS option menu from which users may make selections, along with a description of how they will be sorted (numerically or alphabetically).
All sorts will be in ascending order (lowest to highest) for numerical sorts and alphabetical for character sorts. An option may be added to let users choose whether they may have ascending or descending ordered sorts.
Sorts may be property related, allowing for multiples of a device name to be output. An example of this follows.
The REPORT CONTENTS menu option is a list of properties, attributes, and keys, in which users can choose to create what their output is to look like. When users are done with choosing their report contents they may select the Ok option. If they choose to not keep their selections they may select the Cancel option which will cancel all recently made report selections, and keep the prior set of selections made. When finished with the report contents, users will be asked if any are to be canceled or it they are ok. The following, displays the REPORT CONTENTS pulldown menu, along with a description of what the length of each field would be when output. Please note that with every report content selection, the maximum size of each field will be used followed by a single space to separate the fields. Thus, the number in parenthesis below, is the field size plus one for the single space needed to separate it from the next output entry.
When users choose a report content selection, the choice will be displayed on the right of the screen for verification. Another display on the screen will show users a running count of how many characters their output width will be, along with how many characters are left to fill a 132 character screen. The order in which users choose their report contents, will be the order in which they will be displayed. If users do not choose any report content, a default of device name and template type will be output automatically.
The column headings of all the REPORT CONTENTS menu options, are dependant on what the users choose to output. The users will have the ability to output the DBReport's defined column headings of their selected data output, or they may choose to not output headings at all. Users will not have the ability to choose or create their own column headings. Titles to user's reports will only be given if the data is to be output to a file, and this may only be selected through the Output Location option menu.
The RUN OPTION menu option allows the DBReport to run. It takes the most recent selections made by the users and requests searching for the database information. When the RUN OPTION is chosen, a screen containing the users choices is shown, along with where output is going to be placed. A question will then be asked whether to begin the report or to cancel. If users choose to create the report, and at least one search is chosen the report will begin to be built. At that time a display will be shown keeping a running count of how many devices have been accumulated. If no search keys are picked, an error will appear on the screen stating that at least one search key must be chosen for a report to be made. If users choose to cancel the run of the report, they will be brought back to the main menu, and their prior selections will still be in effect until changed.
The AUTOMATIC REPORTS menu option allows users to choose outputs already set up. These defaulted formats have a defined output of information that is related to a particular source class, handler id, dap type, etc. Users will only need to choose one of the automatic reports, and a particular source class, and the DBReport will set up the appropriate form of output information. If users want the information to be output other than the default of the screen, they must change their Output Location selection prior to choosing automatic reports. By choosing automatic reports, users will not have to access the Run Option menu option since an automatic report is started once selected.
The following is a list of the AUTOMATIC REPORTS options that can be selected at this time, along with a description of their output.
The following submenu appears after an automatic report is selected. The users must choose a source class from which their report is to be made. If users select Cancel the automatic report chosen will not be run. They will, however, be brought back to the AUTOMATIC REPORT menu option to make another selection. If they choose to Cancel from the AUTOMATIC REPORT menu, they will be brought back to the main menubar, and no automatic report will be started.
The following is an output example of what the Normal option of source class option P0 looks like.
The OUTPUT LOCATIONS menu option allows users to have their output placed in a file, on the screen, or both. If users do not choose an output location, prior to running a report (whether it is an automatic report or not), the output will be defaulted to the screen. An output location will stay the same through all reports unless changed by the users. There will be no limit to how many reports can be made.
The users will have the option of two output file locations to choose from, (limited by available disk space). If users choose output to go to a file, the file may be located in the users home directory (SYS$LOGIN), or the scratch disk (USR$SCRATCH). The name given to an output file will be DBReport-(Time Stamp).DAT, or DBReport-(Time Stamp).TMP, depending on the users choice. Choosing a .TMP file name, however, will allow the Mad Deleter to clean up the files every two days .
If the chosen output location is a file, the users will be prompted for a title. If they choose not to type one in, a default title of ``Database Report Facility'' will be output.
The pulldown menu from the OUTPUT LOCATIONS option will look as follows.
When output goes to the screen, a running count of the number of records already displayed verses the overall total will be shown.
Please note that a scratch disk is only located on the WARNER system and not DISNEY. If a scratch disk cannot be allocated for DISNEY the above two scratch disk locations will be omitted from the menu for DISNEY users.
The PRINT SCREEN menu option, allows the users to output information contained on their screen, to their specified printer. Once the users select the PRINT SCREEN menu option, a list of all available printers is shown. The users may scroll through the printer options using the arrow keys until they find their choice and make their selection. Please note, that only what is being viewed on the screen, prior to selecting the PRINT SCREEN menu option, will be printed.
The EXIT menu option allows the users to cleanly terminate execution of the DBReport program. By choosing the EXIT option or by pressing control z or F10, the users will exit DBReport, their screen will return to its original width, and they will be put back to the General Menu from which it was called.
In all menus, to quit out and not save any selections users will now select the Cancel option. To save selections, users will select the Ok option. Also, users will have the ability to cancel selections while in the menu instead of having to exit and enter again to retype the selections.
In section 2.1, searching procedures have been updated to include multiple data selections. The searching keys themselves are set at a maximum of three, and will be logically `and'ed while the multiple data and next keys are `or'ed together. Also, another selection of Crate and Slot is added to the list of searching keys to choose from.
In section 2.2 an example of a sorting output is shown. This is to give users a better viewing of what output is to look like.
In section 2.3 the report content selections now include their length (with space after) in parenthesis following all report content selections. This is to aid users when setting up their output.
In section 2.5 an example of one of the automatic reports is displayed for users to get a better understanding of what the output is going to look like.
In section 2.6 corrections have been made to output locations. A scratch disk is only located on WARNER and not DISNEY. If one cannot be allocated for DISNEY these options must be omitted from DISNEY users menu.
Section 4.0 has more future enhancements added.
In future versions of this program, a command line interface may be installed. This will allow users to quickly retrieve their information without having to go through the menu options. Instead, the users will type a command line consisting of a group of keywords, such as search, sort, output, and log, that the DBReport will access. The DBReport will use these commands to pull device information from the database, sort the information, output the data to a specified location and log information about the transaction that took place.
Another future enhancement could be the ability to select the logical `and' or `or' for searching keys. At this time, searching keys are all logically `and'ed together, while their data keys are logically `or'ed.
For certain searches such as power supplies, only the power supply device may be wanted as output, and not all of their related devices. This feature, would allow small listings of power supplies and their various properties, verses large listings of not only power supplies, but related devices as well.
CC: Normal Distribution, Dan Johnson -- 6