home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / propmgr2.zip / MAINTAIN.ACG < prev    next >
Text File  |  1986-09-03  |  6KB  |  177 lines

  1. * DATE 08/27/84  12:44
  2. * maintain.ag
  3. STOR t TO more
  4. DO WHIL more
  5.  STOR CHR(PEEK(063)) TO dr
  6.  ERAS
  7.  STOR '?' TO command
  8.  @ 02,00 SAY '---------------------'
  9.  @ 02,20 SAY '---------------------'
  10.  @ 02,40 SAY '---------------------'
  11.  @ 02,60 SAY '--------------------'
  12.  @ 02,19 SAY '> > > F I L E  M A I N T E N A N C E < < <'
  13.  @ 04,22 SAY '1. Find duplicate records'
  14.  @ 06,22 SAY '2. Verify and merge new entries'
  15.  @ 08,22 SAY '3. Verify deleted entries'
  16.  @ 10,22 SAY '4. Purge deleted entries from file'
  17.  @ 12,22 SAY '5. Backup data file'
  18.  @ 14,22 SAY '6. Re-index the records'
  19.  @ 16,22 SAY '7. Use browse command'
  20.  @ 18,22 SAY '8. Return to main menu'
  21.  @ 21,00 SAY '--------------------'
  22.  @ 21,20 SAY '--------------------'
  23.  @ 21,40 SAY '--------------------'
  24.  @ 21,60 SAY '--------------------'
  25.  @ 22,22 SAY 'What next'
  26.  @ 22,33 GET command picture '!'
  27.  READ
  28.  DO CASE
  29.  CASE command = '1'
  30.   ERAS
  31.   @ 07,22 SAY'Looking for duplicate records'
  32.   DO dupcheck.acg
  33.  CASE command = '2'
  34.   ERAS
  35.   @ 07,22 SAY'Looking for un-verified new records'
  36.   DO verifnew.acg
  37.  CASE command = '3'
  38.   ERAS
  39.   @ 07,22 SAY'Looking for records marked for deletion'
  40.   DO verifdel.acg
  41.  CASE command = '4'
  42.   DO purge.acg
  43.  CASE command = '5'
  44.   STOR 'Y' TO doit
  45.   ERAS
  46.   @ 01,05 SAY 'This module makes a backup of the DATA File to another disk'
  47.   @ 03,05 SAY 'Do you want to do a backup of the DATA File (Y/N) ?'
  48.   @ 03,59 GET doit PICTURE '!'
  49.   READ
  50. * if they do want to backup the files
  51.   IF doit = 'Y'
  52.    @ 03,00
  53.    @ 07,05 SAY 'The DATA File is on drive '+dr+' and you normally backup to drive B'
  54.    @ 09,05 SAY 'Make sure the backup disk is in the drive selected for backup'
  55.    STOR 'A' TO bdr
  56.    @ 13,05 SAY 'Which drive selected for backup DATA File ? ' GET bdr PICTURE '!'
  57.    READ
  58.    DO WHIL @(bdr,'AB') = 0
  59.     @ 13,05 SAY 'Which drive selected for backup DATA File ? ' GET bdr PICTURE '!'
  60.     READ
  61.    ENDD
  62.    IF bdr <> dr
  63.     @ 17,05 SAY 'Now copying DATA File from drive '+dr+' to drive '+bdr+ ' '
  64.     COPY TO &bdr.:acgbak
  65.    ELSE
  66.     @ 17,05 SAY 'Cant backup to same drive - Aborting'
  67.     @ 23,00 SAY 'Hit RETURN to Continue'
  68.     SET CONSOLE OFF
  69.     WAIT
  70.     SET CONSOLE ON
  71.    ENDI not same drive
  72.   ENDI do backup
  73.  CASE command = '6'
  74.   ERAS
  75.   @ 5,00 SAY 'Please be patient as reindexing takes a little time. I will keep '
  76.   @ 6,00 SAY 'you posted as I go along.'
  77.   @ 6,00 SAY ' '
  78.   SET ECHO ON
  79.   SET TALK ON
  80.   REIN
  81.   SET TALK OFF
  82.   SET ECHO OFF
  83.  CASE command = '7'
  84.   ERAS
  85.   @ 01,12 SAY '***WARNING***  ***WARNING***  ***WARNING***'
  86.   @ 03,13 SAY 'Changes made will be written to the File'
  87.   @ 04,12 SAY 'On the Displaywriter "CODE" is CTRL'
  88.   @ 06,12 SAY 'CTRL-C write current record & go down'
  89.   @ 07,12 SAY 'CTRL-R write current record & go up'
  90.   @ 08,12 SAY 'CTRL-Z/B pans screen left or right'
  91.   @ 09,12 SAY 'CTRL-V toggles Insert on or off'
  92.   @ 10,12 SAY 'CTRL-G Delete character under cursor'
  93.   @ 11,12 SAY 'CTRL-U Delete or Recall current record'
  94.   @ 12,12 SAY 'CTRL-Q exit Dont Write Current record'
  95.   @ 13,12 SAY 'CTRL-W exit and Save all changes'
  96. * get a starting point in file
  97.   STOR 'A' TO stletter
  98.   @ 22,00
  99.   @ 22,12 SAY 'At what letter of alphabet to start browsing'
  100.   @ 22,57 Get stletter PICTURE '!'
  101.   READ
  102.   FIND &stletter
  103.   DO WHIL # = 0
  104.    STOR 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' TO ALPHABET
  105.    STOR @(stletter,ALPHABET) + 1 TO NEXL
  106.    STOR $(ALPHABET,NEXL,1) TO stletter
  107.    FIND &stletter
  108.    RELE alphabet
  109.   ENDD
  110.   SET ESCAPE OFF
  111.   BROW fields lastname, fname, dear, send
  112.   SET escape ON
  113.  CASE command = '?'
  114.   ERAS
  115. TEXT
  116.  
  117.              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 
  118.  
  119.         Thank you for asking me to help you.    At this point you can find 
  120.     duplicate record, verify and merge new entries, etc. Let us go through 
  121.     them one at a time. 
  122.  
  123.     Find duplicate record  - I will search by index number for duplicates.  
  124.  
  125.     Verify and merge new entries -  everytime you create a file - I make a 
  126.     mark in it that says  'This is a new file.'   This part of the program 
  127.     lets you look at all the new entries. If you 'Accept' the entry - then  
  128.     the new mark gets taken out. 
  129.  
  130.     Verify deleted entries - if you have marked a record for deletion - it   
  131.     searches for it  - gives you a chance to make sure what records are to    
  132.     be deleted. Deleted records do not appear in reports.
  133.  
  134.                              
  135.                                      Please hit any key to continue
  136.  
  137.  
  138. ENDT
  139.   SET CONSOLE OFF
  140.   WAIT
  141.   SET CONSOLE ON
  142.   ERAS
  143. TEXT
  144.  
  145.     Purge deleted entries - this permanently removes from the file all entries 
  146.     marked for deletion and then reindexes the file.    Use this carefully and 
  147.     only purge after you have made a backup of the file.
  148.  
  149.     Backup data file - I hate to say this, but computers goof and disks are so 
  150.     so delicate. ALWAYS ALWAYS ALWAYS never let a week go by without a backup-
  151.     so all you lose is one week (do it every day if you want).    This program 
  152.     makes an automatic backup of the data to the program disk if you have sep-
  153.     arate program and data disks.   Otherwise, it requires a blank disk in 'B' 
  154.     drive for backup.  In addition, there should always be another copy of the
  155.     program and data disk.  Use your disk copy program to do this as it is the
  156.     fastest way to copy the entire contents of a disk.                        
  157.  
  158.     Reindex -this is necessary if you are going to search for a file using the 
  159.     search by index command. 
  160.  
  161.     Use browse - browse is there for the expert user.   It allows you to write
  162.     directly into the records. If you do not know what you are doing NEVER use
  163.     browse. 
  164.  
  165.                            Please press any key to return to the menu......... 
  166. ENDT
  167.   SET CONSOLE OFF
  168.   WAIT
  169.   SET CONSOLE ON
  170.   ERAS
  171.  CASE (command = '8' .OR. command = 'Q')
  172.   STOR f TO more
  173.  ENDC
  174. ENDD
  175. RELE ALL
  176. STOR t TO first
  177.