home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / dbaseii / comm.lbr / COMM2-4.CZD / COMM2-4.CMD
Encoding:
Text File  |  1990-04-02  |  5.6 KB  |  203 lines

  1. * Program..: comm2-4.cmd
  2. * Author...: P. V. Pullen
  3. * Date.....: February 20, 1989
  4. * Notes....: This program is used to edit and view records of members in the
  5. *             Congre data base for use in the Donate and Commune Databases
  6. erase
  7. select primary
  8. use b:congre index b:name
  9. store t to contin25
  10. do while contin25
  11. store ' ' to choice
  12. @ 5,5 say '***********************************'
  13. @ 5,40 say '*********************************'
  14. @ 6,5 say '*'
  15. @ 6,72 say '*'
  16. @ 7,5 say '*'
  17. @ 7,72 say '*'
  18. @ 8,5 say '*'
  19. @ 8,72 say '*'
  20. @ 9,5 say '*'
  21. @ 9,72 say '*'
  22. @ 10,5 say '*'
  23. @ 10,72 say '*'
  24. @ 11,5 say '*'
  25. @ 11,72 say '*'
  26. @ 12,5 say '*'
  27. @ 12,72 say '*'
  28. * @ 13,5 say '*'
  29. * @ 13,72 say '*'
  30. * @ 14,5 say '*'
  31. * @ 14,72 say '*'
  32. @ 13,5 say '**********************************'
  33. @ 13,40 say '*********************************'
  34. @ 13,33 say ' Select : : '
  35. @ 13,42 get choice picture '#'
  36. @ 7,25 say '0. Return to previous menu'
  37. @ 9,25 say '1. View a member`s record'
  38. @ 11,25 say '2. Edit a member`s record'
  39. * @ 13,25 say '3. Delete a Member`s total records'
  40. read noupdate
  41. do case
  42.  case choice = '0'
  43.    store f to contin25
  44.    release mfirst, mlast,madd,mcity,mstat,menv,mdonat,mcommune,midno
  45.    loop
  46. case choice='1'
  47.   erase
  48.   select primary
  49.   store t to view
  50.   do while view
  51.   store '                    ' to lname
  52.   @ 10,15 say 'Input the last name of the member whose record you wish to;
  53.                review'
  54.   @ 12,15 say 'Enter Here ' get lname
  55.   read
  56.   if lname = '                    '
  57.     store f to view
  58.     release tem,length,lname,placemark,mcity
  59.     erase
  60.     loop
  61.   endif lname = ' '
  62.   store $(lname,1,1) to tem
  63.   store !(tem) to tem
  64.   store len(lname) to length
  65.   store $(lname,2,length) to lname
  66.   store tem+lname to lname
  67.   erase
  68.   store (trim(lname)) to lname
  69.   find &lname
  70.   if # = 0
  71.     @ 10,10 say 'This Member is not found in the database '+lname
  72.     wait
  73.     erase
  74.     loop
  75.   else
  76.     store # to placemark
  77.     skip  
  78.     if last:name=lname
  79.       skip -1
  80.       store t to nexrec
  81.       @ 1,15 say 'Records which match the last name of '+lname+' are :'
  82.       @ 2,0 say 'Record   Last               First                   Address'
  83.       do while nexrec
  84.       if last:name= lname
  85.         disp last:name,first:name,address 
  86.         skip
  87.         if eof
  88.           store f to nexrec
  89.           go placemark
  90.           loop
  91.         endif
  92.       else
  93.         store f to nexrec
  94.       endif
  95.       enddo
  96.       @ 20,5 say 'Enter Record number to view full information '
  97.       input 'Enter 0 to abort the View Information routine ' to placemark
  98.     else 
  99.       skip -1
  100.       store # to placemark
  101.     endif last:name=lname
  102.     release nexrec
  103.   endif #=0
  104.   if placemark > 0
  105.     go placemark
  106.     erase
  107.     @ 8,5 say 'Lastname : '+last:name
  108.     @ 9,5 say 'Firstname: '+first:name
  109.     @ 10,5 say 'Address : '+address
  110.     store city to mcity
  111.     store (trim(mcity)) to mcity
  112.     store mcity+' ' to mcity
  113.     store mcity+state to mcity
  114.     store mcity + ' ' to mcity
  115.     store mcity+zip to mcity
  116.     @ 11,5 say 'City : '+mcity
  117.     @ 12,5 say 'Envelope # :'
  118.     @ 12,18 say env:no
  119.     @ 12,27 say' Member ID :'
  120.     @ 12,40 say memid
  121.     @ 13,5 say 'Total Donations : '
  122.     @ 13,23 say donations
  123.     @ 14,5 say 'Total Communions: '
  124.     @ 14,23 say commune
  125.     @ 15,5 say 'Last Date Attended (yymmdd)'
  126.     @ 15,34 say last:atten
  127.     wait
  128.     erase
  129.   else
  130.     erase
  131.   endif placemark
  132.   enddo view
  133.   release view
  134. case choice = '2'
  135.   select primary
  136.   erase
  137.    store t to edmem
  138.    do while edmem
  139.      store '                    ' to mfirst
  140.      store '                    ' to mlast
  141.      store '                         ' to madd
  142.      store '                    ' to mcity
  143.      store '  ' to mstat
  144.      store '     'to mzip
  145.      store 0 to menv
  146.      store 0.00 to mdonat
  147.      store 0 to mcommune
  148.      store 0 to midno
  149.      erase
  150.      @ 5,5 say 'Input the member`s last name for data edit ' get mlast
  151.      read noupdate
  152.      if mlast = '     '
  153.        store f to edmem
  154.        release mfirst,mlast,madd, mcity, mstat,mzip,mdonat,mcommune,midno
  155.        release menv,tem,length,trimname,placemark,oktoadd
  156.        select primary
  157.        loop
  158.      else
  159.        store $(mlast,1,1) to tem
  160.        store len(mlast) to length
  161.        store $(mlast,2,length) to mlast
  162.        store !(tem)+mlast to mlast
  163.      endif mlast = '     '
  164.      store (trim(mlast)) to trimname
  165.      find &trimname
  166.      store f to oktoadd
  167.      if # > 0
  168.        erase
  169.        @ 1,1 say 'Records which match the new name:'
  170.        disp last:name first:name while last:name = trimname
  171.        input 'Enter record number to edit, 0 to abort ? ' to placemark
  172.      else
  173.        @ 20,8 say 'Last Name '+mlast+' not found'
  174.        wait
  175.        loop
  176.      endif #>0
  177.      if placemark > 0
  178.        go placemark
  179.        store last:name to mlast
  180.        store first:name to mfirst
  181.        store address to madd
  182.        store city to mcity
  183.        store state to mstat
  184.        store zip to mzip
  185.        store env:no to menv
  186.        store donations to mdonat
  187.        store commune to mcommune
  188.        store memid to midno
  189.        set format to comm2-3
  190.        read noupdate
  191.        replace last:name with mlast,first:name with mfirst,address with;
  192.          madd,state with mstat, zip with mzip, env:no with menv, donations;
  193.          with mdonat, commune with mcommune, memid with midno, city with mcity
  194.        set format to screen
  195.      endif # = 0
  196.    erase
  197.  enddo
  198. endcase
  199. enddo
  200. release choice,oktoadd,oktodel,delmem,addmem,edmem,contin25
  201. return
  202. * eof comm2-4.Cmd
  203.