Kbase P19424: How to dump a table by RECID in ascending and descending order
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
How to dump a table by RECID in ascending and descending order
FIX:
In the event that a single record in a table is corrupt, dumping
the entire table via the Data Dictionary or an index may stop at
the corrupt record and not dump the entire table. With this method,
the table can be dumped by RECID in ascending order until it hits
the bad record, and then backwards in descending order until it hits
the bad record. In this way, all records except the bad record will
be dumped.
PROCEDURAL APPROACH:
====================
The following example will dump the contents of the customer table
from the Progress demo database to a file called "customer.d" by RECID
in ascending order.
OUTPUT TO customer.d.
FOR EACH customer BY RECID(customer):
EXPORT customer.
Note, ascending is the default order. You can verify this by
doing the following:
FOR EACH customer BY RECID(customer):
DISPLAY RECID(customer) name.
In order to dump in descending order, do the following:
OUTPUT TO customer.d.
FOR EACH customer BY RECID(customer) DESCENDING:
EXPORT customer.
The example above can be modified for ranges of RECID.