		awkWARD ACCOUNTING MADE EASY
		------- ---------- ---- ----
			shareware from
			PC Research, Inc.

INTRODUCTION
------------
This directory contains a simple, yet powerful checkbook accounting
system, based upon 'awk(1)'.  Since awk provides great power, with
a minimum of fuss, these tools were easily created, and are portable
to any machine running UNIX.  The tools operate on a common database,
called the "book", which follows the format of a checkbook register.
The file is easily created and updated using any convenient text
editor.

This package is provided as shareware.  If you find this package
useful or educational, you are encouraged to help support the
creation of additional 'shareware packages', by making a contribution
($10 suggested) to:
		PC Research, Inc.
		93 Garrison Drive
		Neptune, NJ   07753
		(201) 922-1124
awkWARD Accounting is (C) Copyright PC Research, Inc. 1985.  Unlimited
non-profit use of this package is hereby granted.

BOOK FILE FORMAT
----------------
Each line in the "book" can be one of:

	# comment, useful for column headers to maintain sanity.
	H output page header, used to document account title/number
	c entry which has cleared the bank
	- entry which has not cleared the bank

The accounting entries are composed of 6 fields, separated by whitespace:

	CLEAR	DATE	CHECK	AMOUNT	ACCOUNT	DESCRIPTION

Where:
	CLEAR		is "c" for cleared entries, "-" for outstanding ones
	DATE		is date of entry, in MM/DD/YY format
	CHECK		is the check number
	AMOUNT		is the amount of the entry
	ACCOUNT		is any 1-7 character name for the account.
			The name "+" is special, it is for deposits.
			Account names are useful for obtaining summaries
			of all transactions of a particular type, e.g.
			"rent", "util", "food", etc.  Use all lowercase,
			if possible.
	DESCRIPTION	Any descriptive text you want to enter, 1-35 chars.
			The first character should be capitalized.

An example "book" file is provided in "demo".  It is reproduced here:

	H	Debbie S. Confused, In Solvent Bank #999 999 999
	#
	#	Accounts:
	#		+	Deposit
	#		rent	House Rent
	#		util	Utilities (gas, electric, water) payments
	#		food	Food expenses
	#
	# Clear	Date	Number	Amount	Account	Description
	# ----- ----	------	------	-------	-----------
	c	12/28/84 -	700	+	Deposit, Sweatshop Clothiers
	c	6/1/85	101	600	rent	Guido Slumlord, june rent
	c	6/1/85	102	75	food	Bob's Greasy Spoon
	c	6/1/85	103	13.31	util	Three Mile Island Electric
	-	6/28/85	-	700	+	Deposit, Sweatshop Clothiers
	-	7/1/85	101	600	rent	Guido Slumlord, june rent
	-	7/1/85	102	75	food	Tanduri Rat Restaurant
	-	7/1/85	103	17.55	util	Three Mile Island Electric

PROGRAMS
--------
Three "awk(1)" programs are provided which operate upon the database.

	balance	book [YR=yr]
	prbook book [YR=yr]
	pracct book account [YR=yr]

BALANCE
-------
The "balance" command is used to reconcile the "book" with the bank
statement.  Once per month, you edit the book, marking the entries
which have cleared the bank with a "c".  Then you use "balance" to
compute the banks idea of your account balance, as well as the current
"book" balance.  Your bank statement and the bank balance must agree,
or else the bank has made a mistake, or you've forgotten to enter
something.  Additionally, running totals for all accounts are printed,
so you can immediately see where all the money has gone.  The optional
parameter "YR=yy" restricts the accumlation of account totals to the
year "yy" (e.g. 84).

A sample run of "balance demo" follows:


Account Reconciliation for Debbie S. Confused, In Solvent Bank #999 999 999


Bank balance            =    11.69
Current balance         =    19.14

Total for food          =   150.00
Total for rent          =  1200.00
Total for +             =  1400.00
Total for util          =    30.86

PRBOOK
------
The "prbook" command is used to print the "book" entries, usually
to a line printer.  The optional parameter "YR=yy" restricts the
entries printed to those for year "yy".  Executing "prbook demo"
produces:


Check Transactions for Debbie S. Confused, In Solvent Bank #999 999 999, Page 1

C CHEK   DATE   DESCRIPTION                          PAYMENT  DEPOSIT  BALANCE
- ---- -------- -----------------------------------  -------  -------  -------
c    - 12/28/84 Deposit, Sweatshop Clothiers                   700.00   700.00
c  101   6/1/85 Guido Slumlord, june rent             600.00            100.00
c  102   6/1/85 Bob's Greasy Spoon                     75.00             25.00
c  103   6/1/85 Three Mile Island Electric             13.31             11.69
-    -  6/28/85 Deposit, Sweatshop Clothiers                   700.00   711.69
-  101   7/1/85 Guido Slumlord, june rent             600.00            111.69
-  102   7/1/85 Tanduri Rat Restaurant                 75.00             36.69
-  103   7/1/85 Three Mile Island Electric             17.55             19.14

PRACCT
------
The "pracct" command is used to print just the entries in the "book"
which are for "account".  The optional "YR=yy" parameter restricts the
entries printed to those found during year "yy".
Executing "pracct demo food" produces:


food Transactions for Debbie S. Confused, In Solvent Bank #999 999 999, Page 1

C CHEK   DATE   DESCRIPTION                          PAYMENT  DEPOSIT  BALANCE
- ---- -------- -----------------------------------  -------  -------  -------
c  102   6/1/85 Bob's Greasy Spoon                     75.00            -75.00
-  102   7/1/85 Tanduri Rat Restaurant                 75.00           -150.00

ACCOUNT NAMES
-------------
Account names are a very useful way to categorize expenses.  If used
consistently, it becomes possible to summarize all expenses for
a particular type of item.  For example,  an account called "taxded"
could be used to group all tax deductable expenditures.  Then, on April
15th, you could use "pracct mybook taxded YR=85" to get a list and total
of all tax deductible expenditures, for Schedule A.

HARDCOPY
--------
The output of each of the programs has been designed to be printed directly
on a line printer having a page length of 66 lines.  Header and trailer
whitespace is automatically supplied.  Thus there is no need to use
an additional filter to prepare the output for the printer.  Simply
use the command:
	prbook | lp
on UNIX System V and derivatives, or
	prbook | lpr
on UNIX Version 7 and derivatives.

If your lineprinter has a page length other than 66 lines, you may
modify "pracct" and "prbook" to adjust for this.  Simply change the
the number "58" in the line:
	if ( (ln % 58) == 0)
so that the number is the page length of your printer minus eight.

NOTES
-----
The whitespace in the command files themselves has been compressed
when necessary, in order to allow operation on systems which
restrict the UNIX command line length to a smaller number of
characters than is usual (e.g. Venix/86).  The "YR" option depends
upon using a relatively new version of "awk(1)".  On older UNIX
releases, this option may not operate at all, although all other
features should operate normally.

Use the comment feature to replicate the column headers for the "book"
every 24 lines, so they will always be visible when editing the file.

Due to implementation restrictions, it is best to use all lowercase
for account names, and to capitalize the first letter of the
description for an entry in the "book".  Otherwise, surprises may
result.

"awk(1)" has poor error diagnostics.  No sanity checking is performed
upon the format of the "book".  A bad "book" means garbage out.

The speed of the commands is a direct function of the length of the
"book".  When the execution time becomes unacceptable, you may
want to split the "book" into pieces, placing previous years data
in another file.  Don't forget to make an initial "Carryover from
previous year" deposit to the current "book".

If you type "pracct mybook", and do not specify an account, a list
of all accounts is printed.  This feature can be used to remind
yourself of the accounts you have defined.  You should periodically
check this list to make sure that you have not duplicated an account
under another name.  The number of accounts is essentially unlimited,
but for esthetic reasons it is usually a good idea to limit the number
of accounts.  It is suggested that you list the accounts you have
defined as comments in the beginning of the "book" file.

You should endeavor to enter items into the "book" in date order,
rather than by check number.  Otherwise, you may be surprised by the
output of "prbook" when year selection is used.
