home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / clarion / tools.zip / TOOLS.COM / COMPRESS.PRG < prev    next >
Text File  |  1988-11-02  |  2KB  |  45 lines

  1. COMPRESS PROCEDURE(FILEIN)
  2. !---------------------------------------------------------------------!
  3. !  THIS PROCEDURE WILL PACK A CLARION FILE AND CHECK FOR ERRORS,      !
  4. !  IF A ERROR IS FOUND A MESSAGE IS SENT TO THE SCREEN.              !
  5. !                                      !
  6. !  TO CALL THIS PROCEDURE.                          !
  7. !                                      !
  8. !     COMPRESS(FILEIN)                              !
  9. !                                      !
  10. !  WHERE:                                  !
  11. !                                      !
  12. !     FILEIN = THE NAME OF THE CLARION FILE.                  !
  13. !---------------------------------------------------------------------!
  14. !     COMPILER: CLARION V2.0                          !
  15. !    SYSTEM: N/A                              !
  16. !    PROCEDURE: COMPRESS                          !
  17. !  ENVIRONMENT: CALLED HAS A PROCEDURE                      !
  18. !   REFERENCES: CLARION FILE                          !
  19. !---------------------------------------------------------------------!
  20. !  HISTORY:                                  !
  21. !    WRITTEN   10/20/88 BY DOMINICK G. GALLUCCI                  !
  22. !    MODIFIED  00/00/00                              !
  23. !---------------------------------------------------------------------!
  24.  
  25. COMPACTING   SCREEN      WINDOW(25,80),AT(1,1),PRE(SOR),HUE(7,0,0)
  26.            ROW(6,6)      STRING('Packing File:')
  27.            ROW(8,24)  STRING('*{5} Please Wait *{5}'),ENH,BLK
  28. FILENAME       ROW(6,19)  STRING(30)
  29.          .
  30.  
  31. FILEIN         EXTERNAL,FILE
  32.  
  33.   CODE
  34.  
  35.     ALERT              !CLEAR ALL ALERT KEY'S
  36.     OPEN(COMPACTING)
  37.     SOR:FILENAME = NAME(FILEIN)      !DISPLAY FILE NAME
  38.     PACK(FILEIN)          !PACK THE FILE
  39.     CLOSE(COMPACTING)
  40.     IF ERROR() THEN
  41.       STOP('PACKING-' & NAME(FILEIN) & ' ' & ERRORCODE() & '-' & ERROR())
  42.     .                     !END IF
  43.     CLOSE(FILEIN)
  44.     RETURN
  45.