/////////////////////////////////////////////////////////////////////////////////////////
// PROGRAMER: Chad Langston, clangsto@vt.edu
// NAME: index2.exe
// LASTCOMPILED: 8/5/2000
// OS: Windows 95 SE
// COMPILER: MSVC++ 6.0(service pack4)
//
// USAGE:
// index2.exe [text file] [command file] [log file]
//
// text file must store records in the following format:
//
// Number of Records in database file: 10
// --------------------
// name
// street
// city state zip
// phone
// --------------------
// . . .
// --------------------
//
// that is, it must begin with the first line. The records must be seperated by a line
// of dashes. the city, state and zip fields must be tab seperated and all fields must
// end in newline.
//
// HANDLING:
// This program will return an error message and exit in the following cases:
// 1. The program is not executed properly
// 2. The input file does not exist.
// 3. The ouput file does not exist.
//
// SUMMARY:
// Initially, Index2.exe reads records from a text file and stores the name field and
// the file position of the record in a Hash Table. It also stores the zip code field
// and the file position of the record in an Inverted Table. It then reads commands
// from a command file and perfoms the precribed actions. The commands are as follows:
//
// name <name>
// zip <zipcode>
// insert <name> <street> <city> <state> <zip> <phone>
// delete <name>
// change <name> <phone>
// hashtable
// invertedtable
// exit
//
// Commands are case sensitive and they must be tab delimeted ending with a newline.
// Output is sent to the user specified log file in a tabular form.
/////////////////////////////////////////////////////////////////////////////////////////
|