home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / workdb.zip / MAINTAIN.INV < prev    next >
Text File  |  1983-01-04  |  4KB  |  110 lines

  1. * maintain.inv 08/18/83
  2. STORE t TO more
  3. DO WHILE more
  4.     STORE CHR(PEEK(063)) TO dr
  5.     ERASE
  6.     STORE '?' TO command
  7.     @ 02,00 SAY '---------------------'
  8.     @ 02,20 SAY '---------------------'
  9.     @ 02,40 SAY '---------------------'
  10.     @ 02,60 SAY '--------------------'
  11.     @ 02,19 SAY '> > > F I L E  M A I N T E N A N C E < < <'
  12.     @ 06,22 SAY '1. Backup data file'
  13.     @ 08,22 SAY '2. Zero shipment and backorder counters'
  14.     @ 10,22 SAY '3. Use browse command'
  15.     @ 12,22 SAY '4. Return to main menu'
  16.     @ 15,00 SAY '--------------------'
  17.     @ 15,20 SAY '--------------------'
  18.     @ 15,40 SAY '--------------------'
  19.     @ 15,60 SAY '--------------------'
  20.     @ 17,22 SAY 'What next'
  21.     @ 17,33 GET command picture '!'
  22.     READ
  23.     DO CASE
  24.         CASE command = '1'
  25.             STORE 'Y' TO doit
  26.             ERASE
  27.             @ 01,05 SAY 'This module makes a backup of the DATA File to another disk'
  28.             @ 03,05 SAY 'Do you want to do a backup of the DATA File (Y/N) ?'
  29.             @ 03,59 GET doit PICTURE '!'
  30.             READ
  31.             IF doit = 'Y'
  32.                 @ 03,00
  33.                 @ 07,05 SAY 'The DATA File is on drive '+dr+' and you normally backup to drive B'
  34.                 @ 09,05 SAY 'Make sure the backup disk is in the drive selected for backup'
  35.                 RESET
  36.                 STORE 'B' TO bdr
  37.                 @ 13,05 SAY 'Which drive selected for backup DATA File ? ' GET bdr PICTURE '!'
  38.                 READ
  39.                 DO  WHILE @(bdr,'ABCD') = 0
  40.                     @ 13,05 SAY 'Which drive selected for backup DATA File ? ' GET bdr PICTURE '!'
  41.                     READ
  42.                 ENDDO while @
  43.                 IF bdr <> dr
  44.                     @ 17,05 SAY 'Now copying DATA File from drive '+dr+' to drive '+bdr+ ' '
  45.                     COPY TO &bdr.:stockbak
  46.                 ELSE
  47.                     @ 17,05 SAY 'Cant backup to same drive - Aborting'
  48.                     @ 23,00 SAY 'Hit RETURN to Continue'
  49.                     SET CONSOLE OFF
  50.                     WAIT
  51.                     SET CONSOLE ON
  52.                 ENDIF not same drive
  53.             ENDIF do backup
  54.         CASE command = '2'
  55.             STORE 'N' TO command
  56.             ERASE
  57.             @ 01,05 SAY 'This Module will zero all order and backorder counters'
  58.             @ 03,05 SAY 'Do you wish to continue (Y/N) ? '
  59.             @ 03,45 GET command picture '!'
  60.             READ
  61.             IF command = 'Y'
  62.                 @ 10,10 SAY ' COUNTERS NOW BEING ZEROED FOR VOLUME  '
  63.                 GOTO TOP
  64.                 DO WHILE .NOT. EOF
  65.                     @ 10,55 SAY disk
  66.                     REPLACE change1 WITH f
  67.                     REPLACE daych1 WITH '        '
  68.                     REPLACE ship WITH 0
  69.                     REPLACE change2 WITH f
  70.                     REPLACE daych2 WITH '        '
  71.                     REPLACE ship WITH 0
  72.                     REPLACE backship WITH 0
  73.                     SKIP
  74.                 ENDDO while not eof
  75.             ENDIF command = Y
  76.         CASE COMMAND = '3'
  77.             * browse thru records
  78.             ERASE
  79.             @ 01,12 SAY '***WARNING***  ***WARNING***  ***WARNING***'
  80.             @ 03,13 SAY 'Changes made will be written to the File'
  81.             @ 06,12 SAY 'CTRL-C write current record & go down'
  82.             @ 07,12 SAY 'CTRL-R write current record & go up'
  83.             @ 08,12 SAY 'CTRL-Z/B pans screen left or right'
  84.             @ 09,12 SAY 'CTRL-V toggles Insert on or off'
  85.             @ 10,12 SAY 'CTRL-G Delete character under cursor'
  86.             @ 11,12 SAY 'CTRL-U Delete or Recall current record'
  87.             @ 12,12 SAY 'CTRL-Q exit Dont Write Current record'
  88.             @ 13,12 SAY 'CTRL-W exit and Save all changes'
  89.             * get a starting point in file
  90.             STORE 0 TO stletter
  91.             @ 22,00
  92.             @ 22,12 SAY 'At what volume shall we start browsing'
  93.             @ 22,57 Get stletter
  94.             READ
  95.             * goto starting point or next if no find
  96.             LOCATE for disk = stletter
  97.             IF EOF
  98.                 GOTO TOP
  99.             ENDIF EOF
  100.             * browse thru file
  101.             SET ESCAPE OFF
  102.             BROWSE
  103.             SET ESCAPE ON
  104.         CASE (command = '4' .OR. command = 'Q')
  105.             STORE f TO more
  106.     ENDCASE
  107. ENDDO while more
  108. RELEASE ALL
  109. STORE t TO first
  110.