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

  1. * dupcheck.cmd 02/12/83 sml
  2. * check for duplicate records based on last name
  3.  
  4. * since this program will use so many new variables
  5. * save the ones we have now, and restore them when done
  6. SAVE TO temp1
  7. RELEASE ALL
  8.  
  9. * start at the beginning of the files
  10. GOTO TOP
  11.  
  12. * set up loop to repeat until the whole files has been processed
  13. * or the user decides to quit
  14. STORE t TO more
  15. DO WHILE more .AND. (.not. eof)
  16.   
  17.   
  18.   * display something to read while searching for duplicates
  19.   ERASE
  20.   ?
  21.   ?
  22.   ?
  23.   ?
  24.   ?
  25.   ? '             Searching for duplicate records' 
  26.   
  27.   * save the current name, in upper case, for comparison
  28.   STORE !(lastname) TO oldlname
  29.   
  30.   * move to the next record to compare
  31.   SKIP
  32.   
  33.   * if match is found and eof has not been reached
  34.   * let user look at both and decide what to do
  35.   IF oldlname = !(lastname) .AND. (.not. eof)
  36.     DO duprec.acg
  37.   ENDIF oldlname = !(lastname) .AND. (.not. eof)
  38.   
  39.   * loop back and test again 
  40. ENDDO WHILE more .AND. (.not. eof) 
  41.  
  42. *restore the original memory
  43. RESTORE FROM temp1
  44.  
  45.