[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PACK
 Remove deleted records from a database file
------------------------------------------------------------------------------
 Syntax

     PACK

 Description

     PACK is a database command that removes all records marked for deletion
     from the current database file, REINDEXes all active indexes in the
     current work area, and recovers all the physical space occupied by the
     deleted records.  During its operation, PACK does not create any backup
     files, although the associated REINDEX operation may.  After the PACK
     command terminates, the record pointer is reset to the first logical
     record in the current work area.

     In a network environment, PACK requires that the current database be
     USEd EXCLUSIVEly.  If this condition is not met when PACK is invoked,
     CA-Clipper generates a runtime error.

     Note that PACKing large database files can be a time-consuming process
     and may not be feasible in a high-volume transaction system on a
     network.  By modifying the system design, you can remove the necessity
     of physically removing records from the database file altogether.  See
     the "Network Programming" chapter in the Programming and Utilities Guide
     for more information.

 Examples

     .  The following example shows the result of a simple PACK:

        USE Sales NEW
        ? LASTREC()                  // Result: 84
        //
        DELETE RECORD 4
        PACK
        ? LASTREC()                  // Result: 83

 Files   Library is CLIPPER.LIB.


See Also: DELETE DELETED() FLOCK() RECALL REINDEX SET DELETED
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson