                  Plain Vanilla Posting Program 3.0


1. What the Posting Program Is

The Plain Vanilla Posting Program is a simple program that takes over
three of the most boring accounting tasks--posting from the general
journal to the general ledger, drawing a trial balance, and putting
account balances into a report. It does job this much faster and more
accurately than you can, and it won't let you post an unbalanced entry.
Your books will always be in balance.

The posting program features open design. The input to the posting
program and the output from the posting program are plain text files in
familiar formats. The journals look like journals, the ledgers look like
ledgers. You can use a word processor or text editor to create, modify,
examine and print these files and move data from one file to another.

With versions II and 3.0, source code is supplied with the posting
program. If you have a C++ compiler, you can recompile and relink the
posting program. You might want to do this if you have received the
program from a questionable source and you suspect that unauthorized
changes have been made to the object code. You might also want to make
some changes to suit your own application, but you're on your own there.
We can't assure you that your changes will work.

If you outgrow the posting program and want to use a more comprehensive
accounting package, you can take advantage of this open design to move
your records, if the other accounting package is similarly
accommodating.


2. What the Posting Program Is Not

The posting program has no security features. There are no passwords,
for example. So lock up your backup media if security may be a problem.
Also, you should probably print out your files and manually sign and
date the printed copies for authentication.

The posting program is NOT copy protected. It is copyrighted, so you may
not legally sell it, but you can give it away. In fact, we encourage you
to distribute it as widely as possible. However, if you make changes, we
ask you to pass on only the original, unmodified code.

Finally, there is no accounting tutorial with the posting program. It is
presumed that you are familiar with manual accounting procedures, with
the operating system, with a suitable word processor or text editor, and
with the necessity of keeping backup copies of everything.


3. What You Need to Use the Posting Program

To use the posting program, you need a compatible computer. There is a
version for Windows 95/98/2000/NT and another for Red Hat Linux.

You also need a word processor, or at least a text editor, that produces
ASCII files. There are many of them.

To get full use of the posting program, you'll need a word processor
that allows you to move text from one file to another. You'll want to do
that quite often.


4. Getting Started

The first thing to do is to make a backup copy of the distribution media
and put it in a safe place. That's always recommended. Then copy the
file POST.EXE from the distribution media to your own hard disk. If your
word processor allows you to edit two or more documents at the same time
(and the best ones do), and you need to refer to this manual while
you're editing your journal file, you can call up the file README.TXT
(under whatever name you have chosen to give it), use the text search
feature of your word processor to find the part you need to refer to,
read it right off the screen. Your word processor can probably turn the
pages much faster than you can.

The posting program will run under Windows, but you'll first have to
open a DOS Window, because it is a command-line application.

Invoking the posting program is easy. Just type the following command
line:

    post  <journal file>

The journal file contains not only the traditional journal entries, but
also a number of commands to tell the posting program what to do.

You can put all this information into a single journal file, as in the
example described in the following sections. However, it will probably
be convenient to put some things into separate files.

Error messages, if any, are normally sent to the standard output device.
They may be redirected to a file by including the filespecs as a second
command line argument:

     post  <journal file>  <error message file>

If you wish to use a graphical user interface (GUI), there is a second
program that you can use with Windows 98. (It has not been tested with
other versions of Windows.) It resides in the file GUIPOST.EXE. Make
sure this file is in the same directory (folder) as POST.EXE. To launch
this program, just create a shortcut to GUIPOST.EXE and put it on your
desktop. The easiest way to do this, under most versions of Windows, is
to use the Windows Explorer. Just right-click the file GUIPOST.EXE and
select "Create Shortcut" from the context menu. A shortcut will appear.
Then use the mouse to drag this shortcut to a vacant space on your
"desktop". An icon will appear. You can launch GUIPOST.EXE by
double-clicking this icon.

When you launch the GUIPOST program, a window containing a list box
called "Journal Files" appears. To add a journal file to the list,
click on the "Add" button and select a file from the file dialog.
To remove a jounral file, select it from the list box and click on the
"Remove" button.

To post from a journal file, select it from the list box and click on
the "Post" button. The error messages (and any other message output)
from the posting process will appear in the read-only edit window below
the list box.

Of course, to create and modify journal files, you'll need a regular
text editor or word processor. You may use one that came with the
operating system, or you may use any of many free or commercial text
editors that are available.


5. Names

The posting program needs names for a number of different things:

     (1) accounts
     (2) aliases
     (3) commands
     (4) companies
     (5) journals
     (6) variables

You make up your own account, alias, company, journal and variable
names; the posting program has its own list of command names.
Nevertheless, they all follow the same rules.

A name consists of one or more words. Each word begins with a letter.
Subsequent characters in the word may be letters, digits or virgules
(/). Words are separated by spaces or tabs. Hence "Equipment1991" is an
acceptable account name (without the quotation marks, of course), but
"Equipment 1991" is not. The reason for this rule is that the number
"1991" might be mistaken for an account balance in some contexts.

Punctuation marks, such a commas, may not be used in account names.
However, the virgule (/) is very common in abbreviated account names
(such as A/P), so it is permitted.

The posting program does not distinguish between capital and small
letters, so "CASH" and "Cash" are the same. The spacing between words is
also unimportant, so "accounts payable" (with a single space between the
words) is the same as "accounts  payable" (with two spaces between the
words), but "accountspayable" is different, and so is "payable
accounts".

Wherever a name contains two or more spaces or tabs in a row, the
posting program reduces them to a single space. Spaces at the beginning
and end of a name are removed. Hence the name " How   now brown cow  "
is reduced to "How now brown cow".

There is no particular limit to the length of a name, but excessively
long names will slow the posting program down and may render trial
balances almost unreadable.

Journal names are truncated to 12 characters before posting, so there is
no point in making them more than 12 characters long.


5. The Journal File Format

An asterisk (*) in the journal file marks the beginning of a comment.
The asterisk and everything to the right of it on the same line are
ignored by the posting program.

Items in the journal other than traditional journal entries are called
commands. A command consist of a command name (which usually begins in
the leftmost column, but may be indented), followed by a colon and any
other information needed.

Command names are case-insensitive.


6. Creating Ledger Accounts

The first thing you need, with either the posting program or a manual
accounting system, is a set of accounts. DEBIT ACCOUNT and CREDIT
ACCOUNT commands create ledger accounts:

     * asset accounts
     DEBIT ACCOUNT:  Cash
     DEBIT ACCOUNT:  Accounts Receivable
     DEBIT ACCOUNT:  Inventory

     * liability accounts
     CREDIT ACCOUNT: Accounts Payable

     * capital accounts
     CREDIT ACCOUNT: John Doe Capital

     * income accounts
     CREDIT ACCOUNT: Sales
     DEBIT ACCOUNT:  Returns and Allowances

     * expense accounts
     DEBIT ACCOUNT:  Purchases
     CREDIT ACCOUNT: Purchase Discounts
     CREDIT ACCOUNT: Inventory Change
     CREDIT ACCOUNT: Interest Income
     DEBIT ACCOUNT:  Advertising
     DEBIT ACCOUNT:  Rent
     DEBIT ACCOUNT:  Utilities


The account names may appear in any order, but it is helpful to arrange
them in the order in which they will appear in the financial reports.

You may not define two accounts with the same name. If you try, the
posting program will declare an error.

It is permissible to define two or more accounts of the same kind on the
same line, if the names are separated by commas:

     DEBIT ACCOUNT: Cash, Accounts Receivable, Inventory

You may also wish to give an account an abbreviated alias name:

     ALIAS: A/P = Accounts Payable

You may use the alias "A/P" in postings, but the full name "Accounts
Payable" will be used by the posting program in trial balances and
reports.


7. Standard Journal Entries

The standard journal entries are easy to recognize. If the account
name is indented--even a single space--the amount is a credit
amount. Otherwise, the amount is a debit amount. You might want to
align the debit and credit amounts vertically as they would appear
in a ruled journal book. A good text editor will help you do that.
It is not required by the posting program, but it makes the journal
a lot easier to read. Here is an example:

     Accounts Payable     5000.00
          Cash                        5000.00

Dollar amounts are written without dollar signs. Commas are
optional; but it you use them, you must put them in the standard
positions. If a dollar amount is a whole dollar amount, you may
omit the characters ".00" at the end.

Blank lines should be used to separate journal entries. The posting
program uses blank lines to tell where journal entries begin and end so
it can determine whether each one is balanced. If the posting program
encounters an unbalanced entry, it will declare an error.

Each account name must match one created by a previous CREDIT ACCOUNT or
DEBIT ACCOUNT command. If not, the posting program will warn you. Errors
of this kind often result from simple typing errors. The posting program
is very strict about spelling. It has no way of knowing that "Accounts
Payable" is the same as "Acounts Payable".


8. The DATE Command

The DATE command determines the date of all subsequent entries until the
next DATE command. You may express the date in any of several formats:

     DATE: 5/6/2001
     DATE: May 6, 2001
     DATE: 5-6-2001

If you omit the year, it is presumed to be the same as the year in the
preceding DATE command.

Entries before the first DATE command are assigned the current date
according to the system clock.

The posting program will check dates for validity, but not for
reasonableness. Hence it will accept "July 5, 2075" but not
"February 29, 2002".


9. The JOURNAL Command

The name of the journal is normally the same as the name of the file.
However, you can use the JOURNAL command to specify a different name:

     JOURNAL: General

The journal name has the same restrictions as the name of an account.
There is no specific limit to its length, but it should be short,
because it is truncated to 12 characters when postings are entered into
the ledger.


10. The COMPANY Command

If you keep books for two or more companies, you may want to use the
COMPANY command:

     COMPANY: XYZ Company

The company name has the same restrictions as the name of an account.
There is no specific limit to its length.

The posting program will declare an error if two COMPANY commands with
different company names appear in the same invocation.


11. The TRIAL BALANCE Command

At any place in the journal, you may draw a trial balance with either of
the following two commands:

     TRIAL BALANCE: tbfile
     CONDENSED TRIAL BALANCE: tbfile

The trial balnace is written to the specified file, in the form of a
journal entry suitable for posting. In fact, you will probably want to
use the post-closing trial balance as the opening entry in next year's
journal.

If you put a plus sign (+) immediately before the trial balance file
specifications, the trial balance will be appended to any text already
in the file; otherwise, any text already in the file will be lost.

A condensed trial balance omits all accounts with zero balances.


12. The LEDGER Command

The LEDGER command writes a ledger to the specified file:

     LEDGER: ledgerfile

It is normally the last command in a journal.

If you put a plus sign (+) immediately before the ledger file
specifications, the ledger will be appended to any text already in the
file; otherwise, any text already in the file will be lost.


13. The REPORT Command

The REPORT command writes a report:

     REPORT: templatefile, reportfile

The posting program copies the contents of the template file to the
report file, replacing special character sequences called tags by
account balances or other information.

An account name enclosed in braces is replaced by the current balance in
the account. If the account is a credit account with a debit balance, or
vice-versa, the amount is enclosed in parentheses.

In most financial reports printed on typewriters or standard PC
printers, rows of minus signs or equal signs are used to underscore
partial and total sums. The special tags {-}, {=} and
{ } are converted into sequences of minus signs, equal signs or
blanks, respectively, just long enough to underscore an amount.
Blanks are inserted to guarantee alignment with amounts enclosed in
parentheses.

The posting program always leaves room enough for the largest possible
amount with parentheses. By default, amounts are limited to 18 digits,
so it may yield something like the following:

                   100.00
     (              10.00)
      -------------------
                    90.00
      ===================

This wastes a great deal of space when all numbers are much smaller than
the largest amount, as they often are in small companies or
organizations. To prevent this, you can use the CONFIGURE command to
specify a different number of digits:

     CONFIGURE: DIGITS 8

You must do this at the beginning of the journal, before defining any
amounts or variables. The sum above then becomes:

         100.00
     (    10.00)
      ---------
          90.00
      =========

The tag {company:} is replaced by the name specified in the COMPANY
command.

The tag (date:} is replaced by the date in the most recent DATE command.


14. Variables

Financial reports contain balances in ledger accounts, of course,
but they also contain many other dollar amounts that do not appear
in any ledger account. In our example, there are accounts called
"Purchases" and "Purchase Discounts". The total net balance in
these two accounts (remembering that they normally contain debit and
credit balances, respectively) is called "Net Purchases" on the
income statement, but it is not a ledger account.

You can define such non-ledger amounts, which are called "variables", by
the CREDIT VARIABLE and DEBIT VARIABLE commands:

     DEBIT VARIABLE: Net Purchases
     CREDIT VARIABLE: Net Sales

Variable names obey the same rules as account names. You cannot define a
variable with the same name as an account, or vice-versa. If you try,
the posting program will declare an error.

The value of a variable is zero when it is defined. It can be changed by
appropriate sequences of CREDIT, DEBIT, ADD, SUBTRACT and TOTAL
commands in what might be called a pseudo-entry:

     ADD: Purchases
     ADD: Purchase Discounts
     TOTAL: Net Purchases

The posting program adds the balances in the two ledger accounts
(netting debit and credit amounts as required) and puts the result
into the non-ledger amount called "Net Purchases". The balances in the
two ledger accounts are not changed.

There is also a SUBTRACT command that switches an account balance from
debit to credit, or vice versa, before adding it:

     ADD: Net Income
     SUBTRACT: Interest Income
     TOTAL: Operating Income

When three or more account balances are to be added, and the
accounts are listed together in the chart of accounts, you can use a
kind of shorthand. For example, the non-ledger amount called "Total
Expenses" is calculated as follows:

     ADD: Advertising
     ADD: Rent
     ADD: Utilities
     TOTAL: Total Expenses

If the accounts "Advertising", "Rent" and "Utilities" have been defined
together in that order, then this can be abbreviated

     ADD: Advertising .. Utilities
     TOTAL: Total Expenses

This is why it is so desirable to have accounts defined in the order
they will appear on the financial statements. It facilitates this kind
of shorthand.

It is also possible to add previously computed variables. The total must
be a variable. The addends may be either accounts or variables.


15. Closing Entries

There are also special posting commands for closing accounts, with
optional shorthand when the accounts to be closed are consecutively
defined. The entry

     CLOSE: Sales .. Utilities
     INTO: John Doe Capital

is equivalent to

     CLOSE: Sales
     CLOSE: Returns and Allowances
     CLOSE: Purchases
     CLOSE: Purchase Discounts
     CLOSE: Inventory Change
     CLOSE: Interest Income
     CLOSE: Advertising
     CLOSE: Rent
     CLOSE: Utilities
     INTO: John Doe Capital

and its meaning is obvious.

The INTO command may also be used to supply a balancing amount in a
non-closing entry. For example, if several payments are made by check,
you might want to use an entry of the form:

     Advertising    123.67
     Rent           400.00
     Utilities       67.92
     INTO: Cash

Of course, the posting program will be unable to detect any
imbalance, but in this case the checkbook reconciliation will serve
this purpose.

If you design a report to follow the proper format, and it has no
parenthesized amounts, it can be used as a journal file.


16. Messages

A journal for the Plain Vanilla Posting Program 3.0 is something like a
program in itself, expecially if it contains a lot of special posting
commands. You probably won't get it right the first time, and you'll
have to do a little debugging. The special posting command

     MESSAGE: <message string>

will display the specified message on the console (or in the file to
which you have redirected the error messages) when the posting program
executes it. If the message contains tags of the type that normally
appear in report templates, the posting program will replace them with
the company name, date or amounts as required.

For example, the command

     MESSAGE: Cash balance on {Date:} = {Cash}

will tell you what the cash balance was on a specific date, according to
previous postings and DATE commands.


17. The INCLUDE Command

The INCLUDE command is used to include commands and entries from another
file. Its format is as follows:

     INCLUDE: <file specifications>

The contents of the specified file will be processed by the posting
program exactly as though they had been inserted in place of the INCLUDE
command.

It is permissible for the included file to contain an INCLUDE command.
However, to prevent runaways when a file directly or indirectly includes
itself, INCLUDE commands can be nested no more than ten deep.

For example, if two or more journals use the same accounts, you may want
to put all account definitions into a file called ACCOUNTS and put the
following command into each journal:

     INCLUDE: ACCOUNTS

If the file specifications are complete, they are used as they are.
Otherwise, the directory path of the source file in which the INCLUDE
command appears is pasted onto the beginning of the file specifications.
For example, suppose the following INCLUDE command appears in the source
file C:\MYBOOKS\JANUARY\JOURNAL.TXT:

     INCLUDE: ..\ACCOUNTS

Then the included file will be C:\MYBOOKS\JANUARY\..\ACCOUNTS, which is
equivalent to C:\MYBOOKS\ACCOUNTS.


18. Configuration Commands

The CONFIGURE command is used to configure various aspects of the
posting program. Usually, CONFIGURE commands should appear at the
beginning of the journal so they will be processed before the commands
and entries to which they apply.

The following command sets the maximum number of digits in dollar
amounts (including the two digits to the right of the decimal point):

     CONFIGURE: DIGITS <number of digits>

The LEDGER, REPORT and TRIAL BALANCE commands use this number to
determine how much space is needed for dollar amounts. If the number is
too large, the results may be hard to read because the ledger, report or
trial balance will contain a lot of empty space. If the number is too
small, the posting program will declare an error when it computes a
value that won't fit.

In some countries, the roles of the decimal point (.) and the comma (,)
are the opposite of those in the United States. The following command
tells the posting program to make that change:

     CONFIGURE: COMMA IS DECIMAL

When the posting program handles dates, it uses the form MM/DD/YYYY. The
following command configures it to use the form DD/MM/YYYY:

     CONFIGURE: DAY/MONTH/YEAR

The following command tells the posting program to quite after it has
detected the specified number of errors:

     CONFIGURE: MAXIMUM ERRORS  <number>

If this number is zero, there is no maximum and the posting program
will continue no matter how many errors it detects. This is the default
configuration.


19. Unimplemented Commands

The following commands have not yet been implemented, and will generate
errors if you try to use them:

     BEGIN REVERSE
     END REVERSE
     POST CREDIT POSITIVE
     POST DEBIT POSITIVE
     ROUND


20. Auditing and Security

If you keep a written journal and then use a word processor to create an
electronic image of it for the posting program, be sure to keep the
original written record if it is required by tax, regulatory or auditing
authorities.

The easy access to journal and ledger files means that you have to be
careful about security. Anyone with a word processor could make
unauthorized changes in a ledger file, or any other file, and you might
not be able to detect them. You might consider using a separate
encryption program to encrypt the files.


21. Sample

A sample accounting project is included with this package. It consists
of the following files:

     File      Description
     --------  ----------------------------------
     JOURNAL   Journal to be posted
     ACCOUNTS  Chart of accounts
     GENERAL   General ledger postings for period
     BS.FRM    Template for balance sheet
     IS.FRM    Template for income statement

When the JOURNAL file is posted, it produces the following results:

     File      Description
     --------  ----------------------------------
     REPORT    Income statement and balance sheet
     PCTB      Post-closing trial balance
     LEDGER    Ledger



