# Marine Tank Curses User Interface

Help Topics
Overview | Configuration File
Access Rights | Ins/Remove Menu
Find Menu | Display Menu
File Menu

Overview

The Marine Tank terminal program provides the user with an easy to use menu driven interface consisting of one main menu and several sub-menus:

       ------- MARINE TANK WATER TEST MAIN MENU -------

      (0) - Exit this program
      (1) - Add, Remove, or Change items in the database
      (2) - Find items in the database
      (3) - Display items in the database
      (4) - File Operations

      Press the number of your selection

Press 0 to exit program.

Press 1 to go to the insertion/removal menu.
Press 2 to find objects in the database.
Press 3 to display objects in the database.
Press 4 for the file operations menu.

When the program is executed for the first time a new database file and index file will be created. The program will automatically open its associated data file and index file every time after that. The program configuration file is used to point the program to the location of the database and establish user access rights. If the database files cannot be found the program will create empty ones in its working directory.

The path to the configuration file can be set by an environmental variable if the configuration file resides in a different directory then the executable. Under UNIX a copy of the configuration file can be placed in each users directory to create a custom profile. If you want to specify a specific database when the program starts, type the program's name followed by the name of the database with no file extension: MyDbase mydbfile

Configuration File

The program's configuration file is used to load configurable parameters from a text file. You can use any text editor to modify the configuration file.

    #######################
    #### Start of File ####
    #######################
    # ---------------------------------------------------------------
    # User configuration file
    # ---------------------------------------------------------------
    # Set the path to this file in the environment or leave this file
    # in the program's working directory.

    # ===============================================================
    # Database file to open when application starts
    # ===============================================================
    # Do not use any file extensions when creating or opening file.
    # Both data and index will share the same name with different
    # file extensions. The data file will have a .pod extension and
    # the index file will have a .btx extension.
    # ===============================================================
    # Database file to open when application starts
    DBFileName=..\db_files\mtank
    # ===============================================================

    # ===============================================================
    # Enable/Disable Admin user privileges
    # ===============================================================
    # Valid entries are FALSE the disable or TRUE to enable. If
    # enabled the user will be allowed to add, change, or delete
    # entries. Will default to FALSE if no valid entry is found.
    # ===============================================================
    AdminUser=TRUE
    # ===============================================================

    # PostScript Setup
    # ===============================================================
    # Maximum string length for each cell
    CellLength=19

    # Font size for the item bar and the cells
    FontSize=7

    # Page orientation: LANDSCAPE or PORTRAIT
    Orientation=PORTRAIT

    # Paper size: LETTER, LEGAL, TABLOID, A3, or A4
    PaperSize=LETTER

    # Font types: COURIER, COURIER_BOLD, COURIER_OBLIQUE, or COURIER_BOLD_OBLIQUE
    ItemBarFont=COURIER_BOLD_OBLIQUE
    CellFont=COURIER
    # ===============================================================

    # ---------------------------------------------------------------
    #####################
    #### End of File ####
    #####################

The program will search for its configuration file in its working directory first and then search the environment. If the program cannot find its configuration file or a configuration file does not exist, it will substitute the configurable parameters with default values set within the source code.

Access Rights

There are two levels of access for the database, administrative access and a general access. Access levels are configured in the program's configuration file. If an access level is not specified the program will default to general access.

General Access

:
General access grants you read-only privileges. You do not have the capability to modify the database with an add, change, delete, import, or merge operation. General access denies you the right to create new database files. If you try to create a new database with general access the program will flag you with a file creation exception and terminate.

Administrative Rights

:
Administrative access grants you read and write privileges. You will be allowed to modify the database, assuming that you have read and write privileges to the actual database files. If you give yourself ADMIN privileges and do not have read and write access to the database files the program will terminate. ADMIN privileges does not give you exclusive rights to the database.

Exclusive Rights

:
Exclusive rights, means that your instance of this program is the only one running. If more then one version of this application is using this database, either over the network or on the same computer, you do not have exclusive access to the database. Any modifications made to the database without exclusive rights will flag the other users with an access violation. An access violation means that the database has been modified and your version is no longer valid. If you receive an access violation, exit the program and restart it.

Insertion and Removal Menu

The insertion and removal menu is used to add items in the database. NOTE: You must have exclusive rights to the database to perform any of these operations. See the Access Rights section.

      --------- DATABASE INSERTION/REMOVAL MENU ---------

      (0) - Return to main menu
      (1) - Add items to the database

      Press the number of your selection

Press 0 to return to the main menu.

Press 1 to add new objects to the database. From here enter the date of the entry and its associated fields. All dates must be entered in a month, day, year format using a two-digit month, a two-digit day, and a four-digit year.

The date field of the object must be unique and can only be entered once. If the object already exists in the database the add function will flag you with an error. NOTE: The database will support duplicate objects, but this feature was not implemented in this program. After a single entry, the test results for the entry will be displayed.

Find Menu

The Find menu is used to find objects in the database. A search can be performed on the object's date field or its comment field. All dates must be entered in a month, day, year format using a two-digit month, a two-digit day, and a four-digit year. Always use forward slashes to separate month, day, and year: 12/17/1997

     ---------- DATABASE QUERY MENU ----------

     (0) - Return to main menu
     (1) - Find objects by Test Date
     (2) - Find objects by Comments

     Press the number of your selection

Two types of searches can be performed, a plain search or a wild card search. A plain search is not case sensitive, but it requires you to enter the complete date or comment string. The plain search will find a single match if searching by date or will find every match of the complete string if searching by comments. After a plain search or wildcard search, you will be given the option to display the object(s) that matched the string. If no matches are found, the program will alert you with a message stating that no matches were found.

A wildcard search is performed by entering the wildcard character "*" anywhere in the entry. Wildcard searches are case sensitive, but only require you to enter a piece of the string. The wild card search will find every occurrence of the string in the specified field.

Display Menu

     ---------- DATABASE DISPLAY MENU ----------

     (0) - Return to main menu
     (1) - Display all items one a time

     Press the number of your selection

Press 0 to return to the main menu.

Press 1 to display each object in the database one by one.

File Menu

     ---------- DATABASE FILE OPERATIONS MENU ----------

     (0) - Return to main menu
     (1) - Display Variable Block Database statistics

     Press the number of your selection

Press 0 to return to the main menu.

Press 1 to display VBD file statistics for the data file and the index file. This information is used to analyze and troubleshoot VBD files. File statistics for both the data file and the index file will be displayed.

End Of Document