home *** CD-ROM | disk | FTP | other *** search
/ Software Du Jour / SoftwareDuJour.iso / BUSINESS / DBASE / DBASEACC.ARC / COSTUPDA.PRG < prev    next >
Encoding:
Text File  |  1979-12-31  |  1.6 KB  |  66 lines

  1.  
  2.  
  3. * COSTUPDA.CMD
  4. * Records from the COSTFILE are added to the COSTBASE.
  5. * This step is so critical to data integrity that we use a password to
  6. * prevent accidental access; verify dates; check the names of suppliers;
  7. * and compute time charges if necessary.  Notice that these are done by
  8. * simply calling the utility command files.
  9. *   The PostFile has all its records marked for deletion after they
  10. * have been posted )can still be recovered).
  11.  
  12. SET TALK OFF
  13.  
  14. @   4,12 SAY '**************************************************'
  15. @   6,12 SAY 'MAKE CERTAIN EVERYTHING IN THE POSTFILE IS CORRECT'
  16. @   8,12 SAY '    BEFORE ENTERING THE CODE TO CONTINUE'
  17. @  10,12 SAY '**************************************************'
  18. SET CONSOLE OFF
  19. ACCEPT TO Lock
  20. SET CONSOLE ON
  21.  
  22. IF !(Lock) <> 'H'
  23.     @ 12,12 SAY '            UNAUTORIZED ACCESS ATTEMPTED.'
  24.     @ 14,12 SAY ' YOU HAVE 6 SECONDS BEFORE THE EXPLOSION.'
  25.     STORE 1 TO X
  26.     DO WHILE X < 150
  27.        STORE X + 1 TO X
  28.     ENDDO
  29.     RELEASE Lock
  30.     RETURN
  31. ELSE
  32.     ERASE
  33.     @ 5,20 SAY 'Checking bills in the POSTING File:'
  34.     USE PostFile
  35.     COUNT FOR .NOT. * TO None
  36.     IF None = 0
  37.  @ 6,20 SAY 'No new entries in the POSTING file.'
  38.  @ 7,20 SAY '<Return> to continue.'
  39.  WAIT
  40.     ELSE
  41.  GO TOP
  42.  RESTORE FROM Constant
  43.  STORE 'Bill:Date' TO Date
  44.  DO DateTest
  45.  DO NameTest
  46.  DO TimeCalc
  47.  ERASE
  48.  @ 5,20 SAY ' *** DO NOT INTERRUPT ***'
  49.  @ 6,20 SAY 'Posting COSTS to the Costbase.'
  50.  USE CostBase
  51.  GO BOTTOM
  52.  STORE # TO LastReco
  53.  
  54.  USE Costbase INDEX $Supp
  55.  APPEND FROM PostFile
  56.  
  57.  USE PostFile
  58.  DELETE ALL
  59.     ENDIF
  60. ENDIF
  61.  
  62. RELEASE All
  63. RETURN
  64.  
  65.  
  66.