Salesforce

How to find the RECID range of a table for an IDXFIX to check one indexed field?

« Go Back

Information

 
TitleHow to find the RECID range of a table for an IDXFIX to check one indexed field?
URL NameP48768
Article Number000149694
EnvironmentProduct: Progress OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
How to find the RECID range of a table for an IDXFIX to check one indexed field?
How to find the RECID range of a particular index ?
How to run IDXFIX for a index range?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The following ABL code has been written for the sports sample database "Customer" table using the index "NAME":
FIND _file WHERE _file-name = "Customer" NO-LOCK NO-ERROR.
    IF NOT AVAILABLE(_file) THEN MESSAGE "Table does not exist" VIEW-AS ALERT-BOX.
    
    ELSE
    DO:
        FIND _storageobject WHERE _storageobject._object-type = 1 AND _storageobject._object-number = _file._file-num NO-LOCK NO-ERROR.
        FIND _Area WHERE _Area._Area-number = _storageobject._Area-number NO-LOCK NO-ERROR.
        DISPLAY _Area-name _Storageobject._Area-number.
    END.

/* Find MIN MAX RECID START */
DEFINE VARIABLE minRecid AS RECID NO-UNDO.
DEFINE VARIABLE maxRecid AS RECID NO-UNDO.

FIND FIRST Customer USE-INDEX NAME.
   ASSIGN 
         minRecid = RECID(Customer)
         maxRecid = RECID(Customer).

FOR EACH Customer NO-LOCK:
   IF RECID(Customer) < minRecid THEN minRecid = RECID(Customer).
   IF RECID(Customer) > maxRecid THEN maxRecid = RECID(Customer).
END.

DISP minrecid maxrecid.
/* Find MIN MAX RECID END */
 
Running: proutil dbname -C idxfix

OPTION 3
SOME
TABLE: Customer
INDEX: NAME
...

At the prompt:

"Provide a range of records to scan through.
Type All or the recid to start the scan at or Q to quit."

>> enter the LOWER recid value here
 
"Type the recid to use as an endpoint or return to scan only one record."
>> enter the HIGHER recid value here
 
"Type the area for the recid(s)."
>> enter the area NUMBER here

The IDXFIX operation will then report it's findings.

Example:

Scanning records 96 to 20480 in area 20 for missing keys:
Phase 1, processing block number 256 in area 20. (8365)
Phase 1, processing block number 512 in area 20. (8365)

Record scan of 96 to 20480 in area 20 complete: 44041 keys read, 44041 total.
Workaround
Notes
Keyword Phrase
Last Modified Date1/29/2018 1:14 PM

Powered by