home *** CD-ROM | disk | FTP | other *** search
/ Software Du Jour / SoftwareDuJour.iso / BUSINESS / DBASE / DB3.ARC / COSTUPDA.PRG < prev    next >
Encoding:
Text File  |  1984-10-25  |  2.5 KB  |  76 lines

  1.      **********  Costupda COMMAND FILE **********
  2. *      Records from the Postfile are added to the Costbase.
  3. * This step is so critical to data integrity that we: use a password
  4. * to prevent accidental access; verify dates; check the names of suppliers;
  5. * and compute time charges if necessary.  Notice that these are done by
  6. * simply calling the utility command files.
  7. *      The PostFile has all its records marked for deletion after they
  8. * have been posted (can still be recovered).
  9. *******************************************************************
  10. *
  11. SET TALK OFF
  12. *
  13. * The following commands have been turned into comments by putting asterisks
  14. * in front of them.  If you remove the asterisks, you will have rudimentary
  15. * password protection.        The code word is 'Hal', but can be changed below.
  16.  
  17. * @  4,12 SAY '**************************************************'
  18. * @  6,12 SAY 'MAKE CERTAIN EVERYTHING IN THE Postfile IS CORRECT'
  19. * @  8,12 SAY '    BEFORE ENTERING THE CODE TO CONTINUE'
  20. * @ 10,12 SAY '**************************************************'
  21. * SET CONSOLE OFF
  22. * ACCEPT TO Lock
  23. * SET CONSOLE ON
  24. * IF Lock <> 'Hal'
  25. *    @ 12,15 SAY '     UNAUTHORIZED ACCESS ATTEMPTED.'
  26. *    * Delay built by the following 4 lines
  27. *    X = 1
  28. *    DO WHILE X < 100
  29. *        X = X + 1
  30. *    ENDDO
  31. *    RETURN
  32. * ELSE
  33. * The matching ENDIF is at the end of the file
  34. *
  35.   CLEAR
  36.    @ 5,20 SAY 'Checking bills in the Posting File:'
  37.    SELECT 2 
  38.    PACK
  39.    GO TOP
  40.    IF RECNO() = 0
  41.       @ 6,20 SAY 'No new entries in the Posting file.'
  42.       @ 7,20 SAY '<ENTER> to continue.'
  43.       WAIT
  44.    ELSE
  45.       DO Nametest WITH "2"
  46.       DO Timecalc
  47.       CLEAR
  48.       @ 5,20 SAY ' ***  DO NOT INTERRUPT  ***'
  49.       @ 6,20 SAY 'Posting COSTS to the Costbase.'
  50.       *
  51.       GO TOP
  52.       DO WHILE .NOT. EOF()
  53.          IF .NOT. DELETED()
  54.             SELECT 3
  55.             APPEND BLANK
  56.             REPLACE Check_date WITH A->Check_date,Check_nmbr WITH;
  57.                     A->Check_nmbr,Client WITH A->Client,Job_nmbr;
  58.                     WITH A->Job_nmbr,Amount WITH A->Amount
  59.             REPLACE Name WITH A->Name,Descrip WITH A->Descrip,;
  60.                     Bill_date WITH A->Bill_date,Bill_nmbr WITH A->Bill_nmbr,;
  61.                     Hours WITH A->Hours,Emp_nmbr WITH A->Emp_nmbr
  62.             SELECT 2
  63.          ENDIF
  64.          SKIP
  65.       ENDDO
  66.       *
  67.       DELETE ALL
  68.       SELECT 3
  69.       USE
  70.    ENDIF
  71. * ENDIF
  72. RETURN
  73.