INTRODUCTION:

	This is the Trouble Report System (TRS2) by

	@(#) README 1.2 89/12/19

	Roland J. Stolfa
	Department of Computing and Information Sciences
	Oklahoma State University

	Internet:       rjs@a.cs.okstate.edu


DISCLAIMER:

	All code is public domain.  No guarentee, expressed nor implied,
	covers this code.  I will NOT be responsible for it's use or
	misuse in your application.  I just hope (Underline that in red)
	that it may prove useful to you.  If something doesn't compile,
	I hope that the comments that surround the troble line will be
	sufficient to fix the problem.


DESCRIPTION:

	This is a set of Bourne shell scrips and C programs intended
	to maintain a database of trouble reports.  The actions supported
	in this package are open a trouble report (trouble), post a followup
	on a trouble report (followup), remove a 'thread' of trouble reports
	(rmthread), report all open trouble report ticket numbers (opentr),
	and summarize a class of trouble reports (report).

	As the second release of this package, several things have been
	attempted to clean up the operation.  First off, the links (using
	"ln(2)") have been done away with.  This has been replaced by using
	the trouble ticket id number stored in a soundex index file.  Second,
	some race conditions have been handled better using the "P" and "V"
	shell commands, contained herein.


INSTALLATION PROCEDURES:

1.	Make a directory and put this shar in it.  Then say "sh <fn>".

2.	Edit the file "Localize" to point the "ROOT", "BIN" and
	shell script escape sequences at the localally correct
	values.  Then type "sh Localize" to install these values
	on all files in this directory.  Then edit the Makefile
	and change the -DSYS5 to either -DSYS5 or -DULTRIX.

3.	Say "make install".  This makes the various directories &
	sets the permissions to allow the next procedure to function.

4.	Say "make all".

5.	Done.


DIRECTORY STRUCTURE:

			  /usr/local/lib/Trs
				|
		+---------------+---------------+
    		|		|		|
	      Entry	       Seq	      Xref
		|				|
	    +---+-----+			+-------+-------+
	    |   ...   |			|		|
   <Timestamp1> ... <Timestamp1>     <Soundex> ... <Soundex>

Each TRS record is first built in a temporary.  It is then copied into the
.../Trs/Entry/<Timestamp>" file.  Then it is referenced in a file in the
.../Trs/Xref subdirectory for each SOUNDEX encoded keyword given during
data entry.


NOTES:

1.	If the average TRS record size is small and the default
	block size on the storage device is large, you loose...

2.	Each user can override the default "ROOT" setting by having
	an environment variable "TRSROOT" set to some directory
	that has the same structure as the one above.


FILES:

	Localize

		This shell script patches all the files in this system to
		work with the locally chosen directories.

	Makefile

		Used to create all the executables for each program.

	README

		This file.

	followup.sh

		This program is used to enter a follow up report onto
		the end of a TRS thread.  It walks the thread, from anywhere
		on the thread, to then end and then doubly links the end
		of the current thread to the new report.

	opentr.sh

		This shell script lists the initial trouble report ticket
		number for all active trouble reports.

	print.c

		This simple program is used to print all the command line
		arguments on a line by itself without a carriage return
		on the end.

	report.sh

		This shell script attempts to extract data from the TRS
		database given any combination of keys.

	rmthread.sh

		This shell script removes an entire linked list of trouble
		reports, given a report anywhere in the list.

	soundex.c

		This C program implements a "SOUNDEX" algorithm and is used
		in the TRS to encode keywords within the database to ease
		searching.

	trouble.sh

		This shell script does the actual data entry for the TRS system.
		It attempts to prompt for all the relavant data, generates
		some stuff by default, and then builds all the linked files
		that constitue the database.

	P.c, V.c, lockp.c

		These two programs provide a method of binary semaphores from
		the shell using "link(2)" to be the final arbitrator.

	*.1

		Manual pages for all of the directly executable programs above.
