C5_PACK

 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,
     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



Advertisements

6 responses to “C5_PACK

  1. Pingback: C5_ZAP | Viva Clipper !

  2. Pingback: C5_SET UNIQUE | Viva Clipper !

  3. Pingback: C5_REINDEX | Viva Clipper !

  4. Pingback: C5_RECALL | Viva Clipper !

  5. Pingback: DB Commands | Viva Clipper !

  6. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.