home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / propmgr2.zip / ACCOUNT.CMD < prev    next >
OS/2 REXX Batch file  |  1986-09-03  |  11KB  |  310 lines

  1. * DATE 09/25/84  18:20
  2. * ACCOUNT.PRG
  3. * NOTE - this program is written for dBASEII version 2.4 and up
  4. * to run under 2.3 you wil have to take out the "TEXT" commands
  5. * It will run under CP/M 80, CP/M 86 and MSDOS. Just change the
  6. * name of account.prg to account.cmd to run under CP/M 80.
  7. * just to be on the safe side. To convert to dBASEIII - change
  8. * poke as indicated below.
  9. *
  10. * This program uses the accounting modules of the SIG/M Property
  11. * Manager program without the real estate data bases.  Since both will
  12. * be placed on the same set of disks, when you run the initialization
  13. * program on the Accounting Maintainance menu select the General
  14. * Chart of account. You need place this module, all modules in the .ACC      
  15. * group, ACCOUNT.DBF, ACCOUNT.NDX, CHART2.DBF and CHART.NDX on your disk
  16. * to run just the accounting programs.                                       
  17. *                                                          
  18. *
  19. * The program is self initializing and documented throughout with help menus.
  20. * You must, however, first read and agree to the licensing agreement in this
  21. * file. Otherwise the program will destroy itself.  
  22. *
  23. * This is a highly complicated program and your help in both clearing
  24. * up the bugs and making suggestions will be appreciated. My thanks to the
  25. * many people who helped test and revise this program - and especially to
  26. * Lee Hillard for some great code and for his pretty print and dBASE syntax
  27. * checker program. Lee is at Hilco Software, 304 N. 17th St., Mt. Vernon
  28. * WA 98273. (206) 428-0475. I might add that the coded portion of the program
  29. * was done using RECODE by Hilco. However, there is no way that we could
  30. * fully test this program without extensive field work.  Most of the changes
  31. * from this point on should be relatively simple - so if you are using the
  32. * program, please drop me a note.  We will try to let you know of changes
  33. * as they develop, either via a note or a new SIG/M release. If you find a
  34. * bug or a requirement for the program, please let us know.
  35. *
  36. * Please contact:
  37. *                   Stephen M. Leon
  38. *                   200 Winston Drive
  39. *                   Cliffside Park, NJ 07010
  40. *                   (201) 886-1658
  41. *                         or
  42. *                   Department of Law
  43. *                   2 World Trade Center
  44. *                   New York, NY 10047
  45. *                   (212) 488-7677
  46. *******************************************************************************
  47. *                                                                             *
  48. *                    N O T I C E                                              *
  49. *                                                                             *
  50. * Copyright 1984 by STEPHEN M.LEON.  Non-commercial use or distribution       *
  51. * of the program is authorized only if this notice is retained together with  *
  52. * the text relating to acceptance of the terms of this notice, and the person *
  53. * or persons using the program or benefiting therefrom assume all direct or   *
  54. * indirect risks of such use and agree to indemnify the author and the not-   *
  55. * for-profit computer clubs distributing this program, from any direct or     *
  56. * or indirect expenses incurred by them as a result of their use thereof.     *
  57. * Expenses shall include reasonable counsel fees including reasonable fees    *
  58. * of the author in his capacity as an attorney for services on a reasonable   *
  59. * billing time basis rendered to himself in his capacity as the holder of     *
  60. * the copyright.  Any use of this program constitutes an agreement to the     *
  61. * conditions of this license.  Any other use or distribution is unauthorized  *
  62. * and prohibited  without the express written consent of the author.          *
  63. *                                                                             *
  64. * This program is distributed free (for a nominal media charge) by SIG/M      *
  65. * Special Interest Group/Microcomputers, Box 97, Iselin, NJ 08830.            *
  66. * SIG/M is a not-for-profit undertaking of the Amateur Computer Group of New  *
  67. * Jersey and the New York Amateur Computer Club. This program is also made    *
  68. * available for PC users via PC/BLUE SOFTWARE, also a not-for profit under-   *
  69. * taking of the New Jersey and New York clubs. Permission is granted to any   *
  70. * other not-for-profit group to include this program in their library so long *
  71. * as this notice is retained and the conditions set forth herein are complied *
  72. * with.
  73. *******************************************************************************
  74. CLEA
  75. RELE ALL
  76. RESE
  77. * initializing program of database
  78. SET TALK OFF
  79. IF .NOT. file ("MANAGE.DAT")
  80.  DO INIT.ACC
  81. ENDI .NOT. file
  82. REST from manage.dat additive
  83. IF escap = 'N'
  84.  SET ESCAPE OFF
  85. ENDI excap = 'Y'
  86. IF bells = 'N'
  87.  SET BELL OFF
  88. ENDI bells
  89. IF bright = 'I'
  90.  SET INTENSITY OFF
  91. ENDI brght = 'I'
  92. IF PASS = 'Y'
  93.  ERAS
  94.  @ 12,10 SAY 'PLEASE ENTER THE PASSWORD SLOWLY ........'
  95.  SET EXACT ON
  96.  SET COLON OFF
  97.  STOR '12345678' TO passt
  98.  STOR ' ' TO passt1
  99.  STOR ' ' TO one
  100.  STOR ' ' to one1
  101.  STOR 0 to count
  102.  DO WHIL count < 8
  103.   SET CONSOLE OFF
  104.   @ 12,50 SAY passt1
  105.   WAIT TO one1
  106.   @ 12,50 ACCEPT one1
  107.   SET CONSOLE ON
  108.   STOR TRIM(one) + one1 TO one
  109.   STOR count + 1 TO count
  110.   STOR $(passt,1,count) TO passt1
  111.   @ 12,50 SAY passt1
  112.   SET CONSOLE OFF
  113.  ENDD
  114.  SET CONSOLE ON
  115.  STOR $(one,2,9) TO passt
  116.  IF TRIM(passt) <> TRIM(passp)
  117.   ERAS
  118.   @ 14,10 SAY "U N A U T H O R I Z E D       A C C E S S  "
  119.   @ 17,10
  120.   SET CONSOLE OFF
  121.   QUIT
  122.  ENDI passt
  123.  SET EXACT OFF
  124.  SET COLON ON
  125. ENDI pass
  126. ERAS
  127. TEXT
  128.  
  129. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  130. *                                                                             *
  131. *                  AMATEUR COMPUTER GROUP OF NEW JERSEY                       *
  132. *                                                                             *
  133. *                                                                             *
  134. *                                                                             *
  135. *                                                                             *
  136. *                                                                             *
  137. *                                                                             *
  138. *                                                                             *
  139. *                                                                             *
  140. *                                                                             *
  141. *                                                                             *
  142. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  143.           
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151. ENDTEXT
  152. @ 6,18 SAY "SIG/M  A C C O U N T I N G  M A N A G E R"
  153. STORE 59 TO length
  154. STORE 18 TO  times
  155. DO WHILE times < length
  156. @ 7,times SAY '_'
  157. STORE times + 1 TO times  
  158. LOOP
  159. ENDDO
  160. TEXT
  161. *                                                                             *
  162. *                        A dBASEII ACCOUNTING PROGRAM                         *
  163. *                                                                             *
  164. *                              by Stephen M. Leon                             *
  165. *                                                                             *
  166. *                                         Vers 1.0   Jun 1984 (c) 1984        *
  167. *                                                                             *
  168. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176. ENDTEXT
  177. RELE times, length
  178. STOR 'Y' TO goahead
  179. @ 18,07 SAY "ARE YOU AGREEABLE TO THE TERMS OF THE COPYRIGHT LICENSING AGREEMENT"
  180. @ 19,07 SAY "AS SET FORTH IN THE FILE 'ACCOUNT.PRG' OR 'ACCOUNT.CMD' ? "
  181. @ 19,74 GET goahead PICTURE '!'
  182. READ
  183. DO WHIL @(goahead, 'YN') = 0
  184.  @ 19,74 GET goahead PICTURE '!'
  185.  READ
  186. ENDD WHILE goahead
  187. IF goahead = 'N'
  188.  @ 18,00
  189.  @ 19,00
  190.  @ 18,07 SAY "HAVE YOU READ THE TERMS IN THE FILE 'ACCOUNT.PRG' OR 'ACCOUNT.CMD' ?"
  191.  @ 18,74 GET goahead PICTURE '!'
  192.  READ
  193.  DO WHIL @(goahead, 'YN') = 0
  194.   @ 18,74 GET goahead PICTURE '!'
  195.   READ
  196.  ENDD while @(goahead)
  197.  IF goahead = 'N'
  198.   QUIT
  199.  ELSE
  200.   STOR 'N' TO goahead
  201.   @ 18,00
  202.   @ 19,00
  203.   @ 18,02 SAY "DO YOU UNDERSTAND THAT WITHOUT THIS AGREEMENT I MUST ERASE THE PROGRAM"
  204.   @ 18,74 GET goahead PICTURE '!'
  205.   READ
  206.   DO WHIL @(goahead, 'YN') = 0
  207.    @ 18,74 GET goahead PICTURE '!'
  208.    READ
  209.   ENDD while @(goahead)
  210.   IF goahead = 'Y'
  211.    SET CONSOLE OFF
  212.    DO menu.acc
  213.    QUIT
  214.   ELSE
  215.    QUIT
  216.   ENDI goahead = 'Y'
  217.  ENDI goahead = 'N'
  218. ELSE
  219.  @ 18,00
  220.  @ 19,00
  221. ENDI goahead
  222. IF C = 'Y'
  223.  STOR 41984 TO adr
  224. *in cp/m 80 there is a jmp at location 0 & 5
  225.  IF (PEEK(0)=195 .AND. PEEK(5)=195)
  226. *use 8080 code
  227.   POKE adr ,35,17,37,164,14,6,6,2,26,19,198,16,211,90,254,21,219,91,194,23,164,214,8,198,48,119,35,5,194,8,164,35,13,194,6,164,201,10,9,8,7,12,11,5,4,3,2,1,0
  228.  ELSE
  229. *use 8086 code
  230.   POKE adr ,67,190,38,164,177,6,181,2,138,4,70,4,16,230,90,60,21,228,91,117,2,44,8,4,48,136,7,67,254,205,117,232,67,254,201,117,225,195,10,9,8,7,12,11,5,4,3,2,1,0
  231.  ENDI (PEEK)
  232.  SET CALL TO adr
  233.  STOR '  /  /  ,  :  :  ' TO mem:var
  234.  CALL mem:var
  235.  STOR $(mem:var,1,8) TO mdate
  236.  STOR $(mem:var,10,8) TO mtime
  237.  SET DATE  TO &mdate
  238.  @ 17,10 SAY 'Today is ' + mdate
  239.  @ 17,32 SAY '....and the time is  ' + mtime
  240. * Regular date program
  241. ENDI C='Y'
  242. IF I = 'N'
  243.  STOR '                                                  ' TO BLNKS
  244.  IF DATE() = '00/00/00'
  245.   STOR F   TO OK
  246.  ELSE
  247.   STOR T   TO OK
  248.   STOR 0   TO MM
  249.  ENDI
  250.  DO WHIL .NOT. OK
  251.   STOR $(BLNKS,1,8)            TO DATE:VAR
  252.   STOR $(BLNKS,1,42)       TO ERRX
  253.   @ 18,15 SAY 'Enter Date as MM/DD/YY '
  254.   @ 18,43 GET DATE:VAR  picture '##/##/##'
  255.   READ
  256.   STOR val($(DATE:VAR,1,2))    TO MM
  257.   STOR val($(DATE:VAR,4,2))    TO DD
  258.   STOR val($(DATE:VAR,7,2))    TO YY
  259.   DO CASE
  260.   CASE MM<1 .or. MM>12 .or. DD<1 .or. DD>31 .or. YY<80
  261.    STOR '       Invalid Date - Reenter'   to ERRX
  262.   CASE MM=4 .or. MM=6 .or. MM=9 .or. MM=11
  263.    IF DD>30
  264.     STOR 'Thirty Days hath September, etc. - Reenter'   to ERRX
  265.    ELSE
  266.     STOR T TO OK
  267.    ENDI dd
  268.   CASE MM=2 .and. DD>28 .and. ((1900 + YY)/4)<>int(((1900 + YY)/4))
  269.    STOR '     Not a leap year - Try Again'   TO ERRX
  270.   CASE MM=2 .and. DD>29
  271.    STOR 'February has a Maximum of 29 Days - Reenter' TO ERRX
  272.   OTHE
  273.    @ 20,00
  274.    STOR T   TO OK
  275.    LOOP
  276.   ENDC
  277.   @ 20,00
  278.   @ 20,15 SAY ERRX
  279.  ENDD (.not. OK)
  280.  IF MM>0
  281.   RELE ERRX, OK, MM, DD, YY
  282.   SET date TO &DATE:VAR
  283.   CLEA GETS
  284.  ENDI mm
  285. ENDI I = 'N'
  286. * poke drive letter into memory 039 hex
  287. * IF converting to dBASEIII - set up a public memory variable for drive letter
  288. * You will also have to change the PEEK in each module.
  289. POKE 063,(64+@(dr,'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))
  290. RELE ALL
  291. * set up forever loop for program
  292. STORE t TO keepitup
  293. STORE 1 TO box
  294. DO WHILE keepitup
  295. * set up alternateive routes
  296. DO CASE
  297. CASE box = 1
  298. STORE CHR(PEEK(063)) TO dr
  299. SELECT PRIMARY   
  300. USE &dr.:account
  301. DO main.acc
  302. CASE box = 0
  303. STORE f TO keepitup
  304. ENDCASE
  305. ENDDO while keepitup
  306. ERASE
  307. SET CONSOLE OFF
  308. QUIT
  309.  
  310.