..HEAD02LE. S. Windsor DISBURSE.BAS ..HEAD03LFebruary 27, 1981 Version 01.00 ..FOOT62C-##- DISBURSE.BAS A disbursements register program which accepts a simple input format and produces a complete (single-entry type) disbursements register with monthly as well as annual summaries by category (account) of expenditure. The program permits user definition of categories and subcategories either on-the-fly or via input of a DIF file (as from Visicalc) of the disbursements "chart of accounts"; and it will optionally produce a DIF file of the annual totals by subcategory and, lastly, a single column DIF file "chart of accounts". Contents: 1. Input - transaction file 1.a Name your file 1.b Format 1.c Transaction records 1.d Month header records 1.e Debugging your input 1.f Sample input 2. Optional intermediate input 3. Output 4. Restrictions and limitations 5. Improvements needed ..page ..HEAD05LINPUT INPUT - Transaction file Using EDLIN or a word processor which turns out ASCII files (e.g., not Easywriter 1.1 but Volkswriter is okay and, I believe Wordstar) create an ASCII file (that's what EDLIN does) from your checkstub and other disbursement records - as follows: a. Name your file Give your EDLIN file a prosaic indicative name which allows for a series in time or bank accounts - so e.g., ACHDIS82 would leave room for BCHDIS82, CCHDIS82,...AMHDIS82,...ACHDIS83..., ETC. b. Format Month header record Transaction record Transaction record Transaction record . . . Month header record Transaction record . . .  Restriction: the program currently requires a header record for each of the twelve months even should there be no transaction records that month. ..page c. Transaction records These have the form, CHECKNO$, DAY$, PAYEE$, AMOUNT, CATEGORY$, SUBCAT$ where CHECKNO$ is a 4-character alphanumeric whose first character is a decimal digit or the character "C" as in CASH or CHRG. DAY$ is day of month - 1 to 31 PAYEE$ alphanumeric name as brief or as long as you want. It will be truncated to 35 characters. AMOUNT Is the dollar amount of the transaction entered with digits and decimal points but no "$" and no commas (although these will be added by the program as appropriate). CATEGORY$ is a 3-letter designation for a category of disbursement, e.g., TELephone, INSurance,... SUBCATEG$ is a one-digit subcategory designator You can invent your categories and subcategories as you go - or you can devise a "chart of accounts" for expenses and other disbursements - or you might combine these approaches if you're just starting out. The point is that, if you're already well-organized in this regard, use what you've got; but if you're not, don't spend too much time this late in the tax year obsessing about a complete chart of accounts - just start and keep track of the categories you invent for consistency in entering subsequent data. The program will pull it together for you later. ..page d. Month Header Record Month headers have the format, DIS, A, JAN, 82,, DIS, A, FEB, 82,, . . where, "DIS" - for DISbursements, because maybe I was going to do INCome in in the same format, perhaps intermixed in the same file. (And would like to retain the option.) "A" - This can be any alphabetic. (In practice, I distinguish among the accounts I handle by the first letter of the file name and then choose this one to coincide with that account designator. (Because I wan't sure how I'd use it. The program currently does not examine this field.) "JAN" - 3-letter month designation "82" - 2-digit year designation ",," - The commas can be separated by blanks or not. They are included so that the program is always reading a six-field record.  (Mostly I was trying to get enough information into it without taking the time to think out the processing.) ..page e. Debugging your input No check is made on input other than running the program. Early in the program, you will be asked if you want hardcopy. If you are running this program for the first time or if your input file has been created using EDLIN, you may want to run through without hardcopy as an easy way to locate input errors. Specifically, elect the options HARDCOPY (Y/N) : "N" DEBUGGING INPUT(Y/N) : "Y" In Debugging Input mode, the program will stop at the end of each month's output on the screen and will wait until you are ready to continue.  The format and mode of entry described above is a quick-and-dirty solution to getting a year's worth of books "onto paper" in a hurry, but it is subject to numerous goofs - the most frequent of which seem to be omission of, or insertion of extra, commas. Since this makes for the wrong number of fields in a record, you'll observe the neat formatted screen suddenly showing obviously "unmatched" records even before the program actually stops on an illegal field. The program will print  Checkno field is .... Day is ... Payee is .... Month is ....... to assist you in your search. Be aware that the stop may be delayed and your error prior to that shown. Also, the fields may be nonsensical - but they are still useful for the purpose at hand. If you are a careful proofreader, the above may not necessary. NOTE that the "debugging input" mode can only be activated when hardcopy is not. ..PAGE f. Input example - excerpt DIS, A, JAN, 82,, 4544, 4, 2 FIFTH AVE CO, 1049.29,REN, 4545, 5, STEVDAN STATIONERY, 14.38, OFF, 4546, 6, READER'S, 8.82, OFF, 4547, 6, MARIA BENECIO, 56.01, CLE, 1 4548, 15, NY TELCO/477-4111, 65.16, TEL, 1 4549, 15, LILCO, 123.81, UTI, 3 4550, , VOID,,, 4551, 21, CON EDISON, 83.60, UTI, 1 4552, 22, CASH, 300., AAA, DIS, A, FEB, 82,, 4553, 12, 2 FIFTH AVE CO, 1049.29, REN, 4554, 10, MARIA BENECIO, 56., CLE, 1 DIS, A, MAR, 82,, 4555, 3, 2 FIFTH AVE CO, 1049.29, REN, 4556, 8, CITY COLLECTOR-OCCUP, 132.22, TAX, 6 4557, 8, STRONG OIL, 159.21, UTI, 5 4558, 18, ROBERT STRIK-WINDOW, 29.50, CLE, 1 4559, 21, LILCO, 89.64, UTI, 3 4560, 21, NY TELCO/4111, 70.57, TEL, 1 4561, 21, AMERICAN PROFESSIONAL AGCY, 65., INS, 6 I regularly make use of two categories, not properly part of a chart-of-accounts which may be helpful if you're new to bookkeeping  - AAA A real expenditure which requires further breakdown - it could be a petty cash draw which you'll break down later using the vouchers - or an American Express payment which you want to record on the fly and detail later. - REM This category always has a corresponding amount of 0. After, say, the American Express payment above shall have been detailed, I'd likely leave the American Express payee line but with a category of REM and amount 0. ..PAGE ..HEAD05LINTERMEDIATE (OPTIONAL) INPUT INTERMEDIATE (OPTIONAL) INPUT The presentation of intermediate input is an option which may be selected by the user. She/he is likely to elect to do so if he already has a meaningful chart of accounts or if he plans to use this program to view separate enterprises across the identical spectrum of disbursement categories - perhaps for comparisons, perhaps for treatment as "departments" with the goal of totalling them but also retaining the separate figures.  1. The Chart of Accounts We're dealing with a very simplified, but totally workable, concept of a chart of accounts. Strictly speaking, the chart of accounts is a list of all of the accounts of an enterprise, usually arranged systematically according to liablilities, assets, capital, income, expenses, etc. This program makes some simplifying assumptions: (1) Only disbursement accounts are in the list that is presented to the program. Actually, nothing requires this except perhaps efficiency in sorting. (2) No matter what is in earlier columns of the DIF the last column is the only one used by the program and it is assumed to have 3- or 4-character designations for the accounts (Again, there's no reason that the program won't work with numered, rather than alphabetic abbreviated, accounts - but it hasn't been tested or even looked at yet. (3) The account "names" are in ascending sorted order. 2. After printing output for the twelve months, the program will begin its end-of-year processing by presenting three choices, the first of which is to use a previously created chart-of-accounts DIF file. When this option is selected, the program will automatically produce a single-column DIF file of the corresponding dollar totals. CAUTION: When prompted, you must produce a complete file spec unless your input here is named "CHRTOFAC.DIF" and is on device B. The program will make no assumption about the name of this file other than that , e.g., it won't assume suffix "DIF"). ..page ..HEAD05LOUTPUT OUTPUT 1. A set of printed disbursement books which, for each month, lists a disbursements journal and a summary by category-subcategory.(See bottom this page). 2. A printed end of year summary of totals for each category-subcategory, sorted in alphabetical order. 3. If a DIF file "chart of accounts" was provided by the user as intermediate input, then a single column DIF file of the corresponding $ totals will be output. (See column C on next page.) If categories were defined by the user on-the-fly or from a "paper" chart, the program will optionally provide two single-column DIF files - one of the "chart of accounts" reflected by the input categories and one of the corresponding dollar totals. (See columns D and E on next page.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DISBURSEMENTS FROM XYZ CHASE A/C JAN 1982 CHECK# DAY PAYEE AMOUNT CATEG ------------------------------------------------------------- 4544 4 2 FIFTH AVE CO 1,049.29 REN 4545 5 STEVDAN STATIONARY 14.38 OFF 4546 6 READER'S 8.82 OFF 4547 6 MARIA BENECIO 56.01 CLE1 4548 15 NY TELCO/477-4111 65.16 TEL1 4549 15 LILCO 123.81 UTI3 4550 VOID 0.00  4551 21 CON EDISON 83.60 UTI1 4552 22 CASH 300.00 AAA TOTAL $ 1,701.07  CATEGORY COUNT THIS MONTH 7 0.00 AAA 300.00 CLE1 56.01 REN 1,049.29 TEL1 65.16 UTI1 83.60 UTI3 123.81 ..PAGE ..head05LOUTPUT SAMPLES A B C D E CHRTOFAC.D chrtofac AMHTOTX1 CHRTOFA3 AMHTOT82 ARTIFICIAL AAA 677.8 AAA 677.8 ADMINIST.S ADM 0 BAN 5 ADVERTISIN ADV 0 CAR1 838.68 BANK AND C BAN 5 CAR2 117 CAR & TRAV CAR 0 CAR5 99.5 GARAGE CAR1 838.68 CLE1 141.51 GAS CAR2 117 CON1 150 INSURANCE CAR3 0 DUE 50 MILEAGE-M CAR4 0 INS5 436.62 REPAIRS,I CAR5 99.5 INS6 65 CLEANING,D CLE 0 LEG1 250 CLEANING CLE1 141.51 MED1 83 GARBAGE D CLE2 0 MED2 175.04 COMMISSION COM 0 MED3 57 CONTRIBUTI CON 0 MED5 75 CASH CON1 150 OFF 81.77 OTHER* CON2 0 PER1 358.48 COPYING EX COP 0 PER2 158.5 DUES AND P DUE 50 PER3 328.51 EXTERMINAT EXT 0 PER5 32.38 GIFTS/TIPS GIF 0 PER8 281.45 INSURANCE INS 0 POS 53.14 (CAR)-UND INS1 0 REN 11542.59 FIRE & TH INS2 0 REP2 144.54 LIABILITY INS3 0 TAX6 132.22 LIABILITY INS4 0 TEL1 352.79 LIFE INS5 436.62 UTI1 573.25 MALPRACTI INS6 65 UTI3 564.03 INTEREST INT 0 UTI5 234.29 CRED.& CH INT1 0 MORTGAGE INT2 0 . . . INVESTMENT INV 0 CABLE CON INV1 0 CUSTODIAL INV2 0 FINANCIAL INV3 0 . . . . . . CLOTHING MAINT PER2 158.5 ... . . . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NOTE: Columns C and E represent the same amounts - the same transaction file but C preserves the positioning of the original chart-of-accounts. ..page ..HEAD05LRESTRICTIONS/LIMITATIONS/IMPROVEMENTS TO CONSIDER 1. The program presumes two drives and BASICA. It may not be necessary but no time to check for this release. 2. The program presumes an 80 character screen. I tried to test it for 40-columns on my TV which proceeded to show a totally illegible 80-character line. (Actually, this works since hardcopy and DIF files is the name of the game (ARE the NAMES of the game?) and the neat format is sufficient to know the input is good.) There wasn't time for this release. If there is any real demand, I'll truncate the payee field and fit it in for next version. 3. Dimensions are set to accept up to 200 transactions per month. Lines 4130 - 4150 to alter if insufficient. 4. Sort and merge times were reasonable with my limited test input and somewhere around 100 accounts. 5. An obvious improvement needed for a follow-on version is an input alternative for transaction entry under friendly but disciplined program control with field checking and error feedback at initial entry time. 6. When printing monthly ledgers on screen for purpose of debugging input, stall at the end of each 24 lines. 7. (Probably the most important) Save the monthly detail output, not just on hardcopy but on diskette. Would allow year-to-date output anytime and comparisons by month or yrs-to-date. * * * I am working on a Single Entry bookkeepting system which I plan to complete this fall and to distribute as "freeware". However, if there is any real interest, I INTEND TO MAINTAIN THIS CODE, TO FIX BUGS, TO IMPROVE, TO DEVELOP AND TO REMAIN UPWARD COMPATIBLE at least to the extent that current input to this program will always be an acceptable alternative as will the current simple way of handling the DIF's.