home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
manage2.zip
/
MANAGE.PRG
< prev
Wrap
Text File
|
1986-05-31
|
13KB
|
347 lines
** Last revision: May 27, 1986 at 20:58
* MANAGE.PRG
*
* This is a highly complicated program and your help in both clearing
* up the bugs and making suggestions will be appreciated. My thanks to the
* many people who helped test and revise this program - and especially to
* Lee Hillard for some great code and for his pretty print and dBASE syntax
* checker program. Lee is at Hilco Software, 304 N. 17th St., Mt. Vernon
* WA 98273. (206) 428-0475. I might add that the coded portion of the program
* was done using RECODE by Hilco. However, there is no way that we could
* fully test this program without extensive field work. Most of the changes
* from this point on should be relatively simple - so if you are using the
* program, please drop me a note. We will try to let you know of changes
* as they develop, either via a note or a new SIG/M release. If you find a
* bug or a requirement for the program, please let us know.
*
* April 1986
* After receiving many requests I finally did a conversion of this
* program from dBASEII to dBASEIII. This is the converted version. It
* really has not been tested - so please drop me a card on any problems
* you find.
*
* Please contact:
* Stephen M. Leon
* 200 Winston Drive
* Cliffside Park, NJ 07010
* (201) 886-1658
* or
* Department of Law
* 2 World Trade Center
* New York, NY 10047
* (212) 488-7677
*******************************************************************************
* *
* N O T I C E *
* *
* Copyright 1984,86 by STEPHEN M.LEON. Non-commercial use or distribution *
* of the program is authorized only if this notice is retained together with *
* the text relating to acceptance of the terms of this notice, and the person *
* or persons using the program or benefiting therefrom assume all direct or *
* indirect risks of such use and agree to indemnify the author and the not- *
* for-profit computer clubs distributing this program, from any direct or *
* or indirect expenses incurred by them as a result of their use thereof. *
* Expenses shall include reasonable counsel fees including reasonable fees *
* of the author in his capacity as an attorney for services on a reasonable *
* billing time basis rendered to himself in his capacity as the holder of *
* the copyright. Any use of this program constitutes an agreement to the *
* conditions of this license. Any other use or distribution is unauthorized *
* and prohibited without the express written consent of the author. *
* *
* This program is distributed free (for a nominal media charge) by SIG/M *
* Special Interest Group/Microcomputers, Box 97, Iselin, NJ 08830. *
* SIG/M is a not-for-profit undertaking of the Amateur Computer Group of New *
* Jersey and the New York Amateur Computer Club. This program is also made *
* available for PC users via PC/BLUE SOFTWARE, also a not-for profit under- *
* taking of the New Jersey and New York clubs. Permission is granted to any *
* other not-for-profit group to include this program in their library so long *
* as this notice is retained and the conditions set forth herein are complied *
* with.
*******************************************************************************
* initializing program of multiple database
SET TALK OFF
SET HEADING OFF
SET SCOREBOARD OFF
SET SAFETY OFF
SET DELIMITER ON
SET INTENSITY OFF
SET DELIMITER TO '[]'
PUBL more, first, dr, dconame, clipper, moveit, account, keepitup, frame, line, line1
IF .NOT. clipper
SET FUNCTION 'F2' TO ' '
SET FUNCTION 'F3' TO ' '
SET FUNCTION 'F4' TO ' '
SET FUNCTION 'F5' TO ' '
SET FUNCTION 'F6' TO ' '
SET FUNCTION 'F7' TO ' '
SET FUNCTION 'F8' TO ' '
SET FUNCTION 'F9' TO ' '
SET FUNCTION 'F10' TO ' '
SET DOHISTORY ON
SET HELP OFF
ON ERROR SUSPEND
ON ESCAPE suspend
ENDI
SET PROCEDURE TO PROC
line = REPLICATE(CHR(205),80)
line1 = REPLICATE(CHR(205),78)
frame = CHR(201)+CHR(205)+CHR(187)+CHR(186)+CHR(188)+;
CHR(205)+CHR(200)+CHR(186)
* must have correct date information
DO WHIL SUBSTR(DTOC(DATE()),7,2) = '80'
CLEA
! DATE
! TIME
ENDD
IF .NOT. file ("MANAGE.DAT")
DO INIT
ENDI .NOT. file
REST from manage.dat additive
IF clipper
IF .NOT. file ("CODE.NTX")
CLEA
@ 10,10 SAY 'I must create index files for Clipper.'
@ 11,10 SAY 'Please be patient for a few moments'
@ 12,00 SAY ' '
SELE A
USE &dr.:build
INDE ON bcode TO &dr.:code
SELE B
USE &dr.:tenant
INDE on bcode to &dr.:codea
SELE C
USE &dr.:account
INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
SELE D
USE &dr.:CHART
INDE on acctno TO &dr.:chart
ENDI
ELSE
IF .NOT. file ("CODE.NDX")
CLEA
@ 10,10 SAY 'I must create index files for dBase.'
@ 11,10 SAY 'I will keep you posted'
@ 12,00 SAY ' '
SET ECHO ON
SET TALK ON
SELE A
USE &dr.:build
INDE ON bcode TO &dr.:code
SELE B
USE &dr.:tenant
INDE on bcode to &dr.:codea
SELE C
USE &dr.:account
INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
SELE D
USE &dr.:CHART
INDE on acctno TO &dr.:chart
SET TALK OFF
SET ECHO OFF
ENDI
ENDI clipper
SET PROC TO proc
CLEA
IF clipper
@ 1,0, 16, 79 BOX frame
@ 3,3, 14, 74 BOX frame
ELSE
@ 01,0 TO 16,79 double
@ 03,3 TO 14,74 double
ENDI clipper
@ 05,19 SAY 'AMATEUR COMPUTER GROUP OF NEW JERSEY'
@ 7,18 SAY 'SIG/M P R O P E R T Y M A N A G E R'
@ 9,20 SAY 'A dBASEIII DATA MANAGEMENT PROGRAM'
@ 10,25 SAY 'FOR TENANTED REAL ESTATE'
@ 11,35 SAY 'by Stephen M. Leon'
@ 13,40 SAY 'Vers 2.0 June 1986 (C) 1984,5,6'
STOR 'Y' TO goahead
@ 18,07 SAY "ARE YOU AGREEABLE TO THE TERMS OF THE COPYRIGHT LICENSING AGREEMENT"
@ 19,07 SAY "AS SET FORTH IN THE FILE 'MANAGE.PRG' ? "
@ 19,65 GET goahead PICTURE '!'
READ
DO WHIL AT(goahead, 'YN') = 0
@ 19,65 GET goahead PICTURE '!'
READ
ENDD WHILE goahead
IF goahead = 'N'
QUIT
ENDI
* set up initial database file
SELE A
USE &dr.:build
SET INDEX TO &dr.:code
* set up forever loop for program
DO WHIL .t.
STOR '?' TO comman
CLEA
IF clipper
@ 0,0, 22, 79 BOX frame
@ 4,1 SAY line1
@ 19,1 SAY line1
ELSE
@ 0,0 TO 4,79
@ 0,0 TO 19,79
@ 0,0 TO 22,79 DOUBLE
ENDI
@ 20,5 SAY 'Please select one of the above options. You may also leave this menu'
@ 21,5 SAY "by typing 'Q' and get on-line HELP by typing '?'."
@ 2,06 SAY DCONAME + ' - MAIN MENU'
@ 2,65 SAY DTOC(date())
@ 7,26 SAY "A. Accounting Database"
@ 8,26 SAY "B. Building Database"
@ 9,26 SAY "C. Tenant Database"
@ 10,26 SAY "D. Database Maintenance"
@ 11,26 SAY "E. Help"
@ 12,26 SAY "F. Reports"
@ 13,26 SAY "G. Quit to dBASE"
@ 14,26 SAY "H. Exit to operating system"
@ 17,23 SAY "PLEASE SELECT ONE OF THE OPTIONS"
@ 17,58 GET comman PICTURE '!'
READ
DO WHIL AT(COMMAN, 'ABCDEFGH?Q') = 0
STOR '?' TO comman
@ 17,58 GET comman PICTURE '!'
READ
ENDD
DO CASE
CASE COMMAN = 'A'
SELE C
USE &dr.:account
DO account
CASE COMMAN = 'B'
SELE A
USE &dr.:build INDEX &dr.:code
DO build
CASE COMMAN = 'C'
SELE B
USE &dr.:tenant INDEX &dr.:codea
DO tenant
CASE COMMAN = 'D'
DO maintain
CASE COMMAN = 'F'
DO report
CASE COMMAN = 'E' .OR. COMMAN = '?'
CLEA
TEXT
M A I N M E N U H E L P F I L E
We have tried to make this program as simple and as straight forward as is
possible. There is no separate documentation - but at any point in the pro-
gram where a '?' prompt appears we have built in a help menu to explain the
various options. You also may want to print out the opening program module
(a file called 'MANAGE.PRG')
Remember - HELP is available at any point where there is a question mark.
Just hit ENTER (or '?') and program information will be displayed on screen.
In addition, you can leave any menu by typing 'Q'.
There are three main data bases. BUILDING - which has the basic information
about each property. TENANT - which has data on each tenant in each building
and ACCOUNTING.
Please hit any key to continue
ENDT
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEA
TEXT
The BUILDING and TENANT databases contain information. Who lives where, how
much they pay, did they pay, when is the rent due or the lease up.
The ACCOUNTING data base allows you to make journal entries and input cash
receipts and cash disbursements. From the report menu in the accounting data
base you can print out the Cash Receipts Book, the Cash Disbursements Book,
the General Journal and the General Ledger. To expedite entry of the items
into the file, we require that you run an update program to post the entries
to the ledgers.
The ACCOUNTING data base also allows you to prepare and print a balance sheet
and profit and loss statement (as well as a cash generated from operatings
statement.) Each time you request a statement the data is saved in a file so
that you can always reprint the statement of the date in question.
Please hit any key to continue
ENDT
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEA
TEXT
Reports other than accounting reports are handled through the menu you are now
at. This report function allows you to send out rent bills (but you have to be
sure you first posted the new month from the ACCOUNTING data base). It also
prints out a delinquency report, a vacancy report, a lease expiration report
and address labels for the tenants.
The Maintenance function on this menu allows you to Reindex the BUILDING and
TENANT data bases. (A power surge, an improper shutdown, etc. can mess up your
index - so you may have to reindex. You also can add records without indexing-
but must later use the index function.) If you delete a building and its units
you have to run the Purge function on the Maintenance menu. (When you 'delete'
a file - you do not remove it from the records until you Purge. It merely has
a sign 'Deleted' on the upper left hand portion of the screen. If for some
reason you decide to Edit a deleted file - we assume you want it back and the
program automatically 'undeletes' it.
A very powerful function tool - Browse - is on the Maintenance menu. It allows
you to write directly to any file. Display lets you view the records - but not
change them. The rest is obvious, so enjoy the program.
Press any key to return to the menu
ENDT
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CLEA
TEXT
We have tried to document this program as best we could in the
various HELP menus. We also have tries to give as much guidance
as possible in the source code, so that you could make your own
changes or fix any problems as they developed. The big problem
was space, so we did have to limit source code comments.
We know that there are bound to be problems. We have therefore
done what most programs of this type do not do - we have left the
ESCape key on most of the time to give you an out. If you have
a problem, hit ESCape and type quit. Even if the console is
turned off at that time, you will not see the words being typed,
but it will return to the operating system (assuming you have
not somehow locked up the machine - in which event you will have
to reboot). (Most programs of this type are also not free.)
You may want to take out the ESCape sequence. It is part of the
program initialization. It can always be changed from either of
the maintenance menus.
Hit any key to return to the program
ENDT
SET CONSOLE OFF
WAIT
SET CONSOLE ON
STOR .f. TO moveit
STOR .t. TO first
CASE COMMAN = 'G'
CLEA ALL
RELE ALL
CANC
CASE COMMAN = 'H' .OR. COMMAN = 'Q'
CLEA
SET CONSOLE OFF
QUIT
ENDC
ENDD while .t.