home *** CD-ROM | disk | FTP | other *** search
- ** Last revision: April 17, 1986 at 18:54
- * maintain.prg
- * file maintenance menu
- * set up loop
- STOR .t. TO more
- DO WHIL more
- CLEA
- STOR ' ' TO command
- STOR CDOW(DATE())+' '+CMONTH(DATE())+' '+STR(DAY(DATE()),2)+", "+STR(YEAR(DATE()),4) TO mday
- STOR 'MAINTENANCE MENU' TO mode
- SET COLOR TO &revvideo
- @ 2,00
- @ 2,01 SAY mday
- @ 2,31 SAY mode
- SET COLOR TO &stdvideo
- @ 06,22 SAY 'A. Find duplicate records'
- @ 07,22 SAY 'B. Verify and merge new entries'
- @ 08,22 SAY 'C. Verify deleted entries'
- @ 09,22 SAY 'D. Purge deleted entries from file'
- @ 10,22 SAY 'E. Re-index the records into all indexes'
- @ 11,22 SAY 'F. Use browse command'
- @ 12,22 SAY 'G. Return to main menu'
- @ 15,00 SAY line
- @ 17,33 SAY 'SELECT:'
- @ 17,43 GET command PICTURE '!'
- READ
- DO CASE
- CASE command = 'A'
- DO dupcheck
- LOOP
- CASE command = 'B'
- DO verifnew
- LOOP
- CASE command = 'C'
- DO verifdel
- LOOP
- CASE command = 'D'
- STOR 'N' TO comman
- CLEA
- @ 02,05 SAY '***** WARNING! ***** WARNING! ***** WARNING! ****'
- @ 04,05 SAY 'This will PERMANENTLY remove any deleted records.'
- @ 06,05 SAY 'Type Y to continue, any other key to cancel this operation'
- @ 06,64 GET comman PICTURE '!'
- READ
- IF comman = 'Y'
- CLEA
- TEXT
-
- Records which have been marked for deletion are being removed from the file.
-
- When that is completed, all records will be reindexed.
-
- We will keep you posted as we go along..........but please be patient.
-
- ENDT
- STOR RECCOUNT() TO before
- @ 08,00 SAY 'The data base contains ' + STR(before,4) + ' files before deletions'
- @ 09,00 SAY ' '
- SET TALK ON
- PACK
- SET TALK OFF
- STOR RECCOUNT() TO after
- @ 19,00 SAY 'The data base contains ' + STR(after,4)+ ' files. ' + STR(before-after,4)+' files were deleted.'
- @ 21,00 SAY '***************************************************************************'
- @ 22,20 SAY 'HIT ANY KEY TO CONTINUE'
- SET CONSOL OFF
- WAIT
- SET CONSOL ON
- ENDI comman = Y
- LOOP
- CASE command = 'E'
- CLEA
- @ 2,00 SAY 'We are going to reindex the file. Please be patient as this may'
- @ 3,00 SAY 'take a while.'
- @ 5,00 SAY ' '
- SET TALK ON
- SET ECHO ON
- INDE ON UPPER(lastname)+UPPER(fname) TO lastname
- SET TALK OFF
- SET ECHO OFF
- LOOP
- CASE command = 'F'
- CLEA
- @ 01,12 SAY '***WARNING*** ***WARNING*** ***WARNING***'
- @ 03,13 SAY 'Changes made will be written to the File'
- @ 04,13 SAY 'Follow instructions at the top of screen'
- STOR ' ' TO stletter
- @ 09,13 SAY 'At what letter or number shall we start browsing......'
- @ 09,67 Get stletter PICTURE '!!!!'
- READ
- STOR TRIM(stletter) TO stletter
- SEEK stletter
- IF .NOT. found()
- GO TOP
- ENDI
- SET HEADING ON
- SET ESCAPE OFF
- IF clipper
- DO brow WITH "AG"
- ELSE
- BROW fields lastname, fname, dear, send
- ENDIF .NOT. clipper
- SET ESCAPE ON
- SET HEADING OFF
- LOOP
- CASE command = '?'
- CLEA
- @ 1,13 SAY "M A I N T E N A N C E M E N U H E L P S C R E E N"
- @ 3, 6 SAY "Thank you for asking me to help you. At this point you can find"
- @ 4, 0 SAY "duplicate record, verify and merge new entries, etc. Let us go through"
- @ 5, 0 SAY "them one at a time."
- @ 7, 0 SAY "Find duplicate record - I will search by consumer last names. Where"
- @ 8, 0 SAY "more than one complainant has the same last name it will show. However,"
- @ 9, 0 SAY "in some cases we will have entered the same information twice - and "
- @ 10, 0 SAY "this program will help us locate that error."
- @ 12, 0 SAY "Verify and merge new entries - everytime you create a file - I make a"
- @ 13, 0 SAY "mark in it that says 'This is a new file' This part of the program"
- @ 14, 0 SAY "lets you look at all the new entries. If you 'Accept' the entry - then the"
- @ 15, 0 SAY "new mark gets taken out."
- @ 17, 0 SAY "Verify deleted entries - if you have marked a record for deletion - this"
- @ 18, 0 SAY "searches for it - gives you a chance to make sure what records are to be"
- @ 19, 0 SAY "deleted."
- @ 21,15 SAY "Please hit any key to continue.........."
- SET CONSOLE OFF
- WAIT
- SET CONSOLE ON
- CLEA
- @ 07, 0 SAY "Purge deleted entries - this permanently removes from the file all entries"
- @ 08, 0 SAY "marked for deletion and then reindexes the file. Use this carefully and only"
- @ 09, 0 SAY "purge after you have made a backup of the file."
- @ 11, 0 SAY "Reindex - this is necessary if you are going to search for a file using the"
- @ 12, 0 SAY "search by index command."
- @ 14, 0 SAY "Use browse - browse is there for the expert user. It allows you to write"
- @ 15, 0 SAY "directly into the records. If you do not know what you are doing NEVER use"
- @ 16, 0 SAY "browse. It is simulated in Clipper. "
- @ 21,12 SAY "Please press any key to return to the menu........."
- SET CONSOLE OFF
- WAIT
- SET CONSOLE ON
- CLEA
- LOOP
- CASE command = '*'
- IF .NOT. clipper
- CLEA ALL
- SET TALK ON
- ON ERROR SUSPEND
- ON ESCAPE SUSPEND
- CANC
- ENDI
- LOOP
- CASE (command = 'G' .OR. command = 'Q')
- STOR .f. TO more
- ENDC
- ENDD while more
- STOR .t. TO first
- STOR .t. TO more
- RETU
-