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

  1. * Program.: COMM2-5.Cmd
  2. * Author..: Paul V. Pullen
  3. * Date....: 4 May, 1989
  4. * Notes...: This program is used to reindex the databases for continued use
  5. *           after the addition of new members.
  6. *
  7. erase
  8. select primary
  9. use b:congre
  10. store t to contin24
  11. do while contin24
  12. store ' ' to choice
  13. @ 5,5 say '***********************************'
  14. @ 5,40 say '*********************************'
  15. @ 6,5 say '*'
  16. @ 6,72 say '*'
  17. @ 7,5 say '*'
  18. @ 7,72 say '*'
  19. @ 8,5 say '*'
  20. @ 8,72 say '*'
  21. @ 9,5 say '*'
  22. @ 9,72 say '*'
  23. @ 10,5 say '*'
  24. @ 10,72 say '*'
  25. @ 11,5 say '*'
  26. @ 11,72 say '*'
  27. @ 12,5 say '*'
  28. @ 12,72 say '*'
  29. * @ 13,5 say '*'
  30. * @ 13,72 say '*'
  31. * @ 14,5 say '*'
  32. * @ 14,72 say '*'
  33. @ 13,5 say '**********************************'
  34. @ 13,40 say '*********************************'
  35. @ 13,33 say ' Select : : '
  36. @ 13,42 get choice picture '#'
  37. @ 7,25 say '0. Return to previous menu'
  38. @ 9,25 say '1. Reindex all databases'
  39. @ 11,25 say '2. Pack all databases'
  40. * @ 13,25 say '3. Delete a Member`s total records'
  41. read noupdate
  42. do case
  43.  case choice = '0'
  44.    store f to contin24
  45.    release mfirst, mlast,madd,mcity,mstat,menv,mdonat,mcommune,midno
  46.    select primary
  47.    use
  48.    loop
  49. case choice = '1'
  50.   erase
  51.   select primary
  52.   @ 4,5 say 'I am re-indexing the Congre database on name '
  53.   index on last:name to b:name
  54.   @ 4,5 say 'I am re-indexing the Congre database on Envelope Number'
  55.   index on env:no to b:cenv
  56.   @ 4,5 say 'I am re-indexing the Donate database on Envelope Number'
  57.   select secondary
  58.    use b:donate
  59.   index on env:no to b:denv
  60.   @ 4,5 say 'I am reindexing the Communion Database on Member ID    '
  61.   select secondary
  62.   use b:commune
  63.   index on memid to b:ccom
  64.   select secondary
  65.   use
  66.   erase
  67.   @ 4,5 say 'Thank you for your patience.  I am finished, and will return to'
  68.   @ 5,5 say 'the menu.'
  69.   store 0 to icount
  70.   do while icount<100
  71.     store icount+1 to icount
  72.   enddo
  73.   erase
  74.   store ' ' to choice
  75. case choice = '2'
  76.   erase
  77.   store t to next
  78.   do while next
  79.     select primary
  80.     @ 1,1 say 'The following persons are marked for their records to be deleted'
  81.     @ 2,1 say '      You can recall any particular one in the RECALL loop'
  82.     disp last:name, first:name for *
  83.     @ 18,2 say 'Enter number in the left column to recall any members, 0 to abort'
  84.     @ 19,2 say 'the RECALL loop and to go on to the packing of the databases'
  85.     input '                    RECALL Number or 0 ' to rcll
  86.     read noupdate
  87.     if rcll > 0 
  88.       go rcll
  89.       recall
  90.       store env:no to menv
  91.       store memid to midno
  92.       select secondary
  93.       use b:donate
  94.       recall all for s.env:no= menv 
  95.       select secondary
  96.       use b:commune
  97.       recall all for s.memid=midno
  98.       erase
  99.       loop
  100.     else
  101.       store f to next
  102.       erase
  103.     endif rcll > 0
  104.   enddo next
  105.   store f to pck
  106.   @ 10,10 say 'Are you sure you want me to pack the databases'
  107.   @ 12,10 say '        Y to pack,  N to bypass the pack'
  108.   @ 13,33 say ' Select : :'
  109.   @ 13,42 get pck picture '!'
  110.   read noupdate
  111.   if pck
  112.     select primary
  113.     pack
  114.     select secondary
  115.     use b:donate
  116.     pack
  117.     select secondary
  118.     use b:commune
  119.     pack
  120.     erase
  121.     select secondary
  122.     use
  123.     select primary
  124.     @ 10,10 say 'Now you must do a complete reindex on the databases'
  125.     @ 12,10 say 'Return to the SUB menu is automatic, then select 1 '
  126.     @ 14,10 say 'for the automatic re-index on the databases.       '
  127.     wait
  128.     erase
  129.   else
  130.     erase
  131.   endif pck
  132. endcase
  133. enddo contin24
  134. release contin24,denv,ccom,icount,next,choice,rcll,pck
  135. return
  136. * EOF comm2-5.cmd
  137.