home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol110 / purge.acg < prev    next >
Encoding:
Text File  |  1984-04-29  |  976 b   |  46 lines

  1. * purge.cmd 02/08/832
  2. * remove records from the files
  3. * which have been marked for deletion
  4.  
  5. * scare the user to make sure they want to remove the records
  6. ERASE
  7. ?
  8. ? '*****   WARNING!   *****   WARNING!   *****   WARNING!   ****' 
  9. ?
  10. ? 'This will PERMANENTLY remove any deleted records.' 
  11. ?
  12. ? 'Type Y to continue, any other key to cancel this operation' 
  13.  
  14. SET console OFF
  15. WAIT TO next
  16. SET console ON
  17.  
  18. * if they want to pack the files
  19.  
  20. IF !(next) = 'Y' 
  21.   
  22.   * give the user somethhing to read while files is packed
  23.   ERASE
  24.   ?
  25.   ?
  26.   ?
  27.   ? 'Records which have been marked for deletion' 
  28.   ? 'are being removed from the file' 
  29.   ?
  30.   ? 'When that is completed, all records will then' 
  31.   ? 'be reindexed, so please be patient.' 
  32.   ?
  33.   *pack the files to remove deleted records
  34.   PACK
  35.   
  36.   INDEX ON !(lastname) TO lastname
  37.   INDEX ON !(company1) TO company
  38.   INDEX ON zip TO zip
  39.   SET INDEX TO lastname, company, zip
  40.   
  41. ENDIF !(next) = 'Y'  
  42.  
  43. * release local variables
  44. RELEASE next
  45.  
  46.