Consultor Eletrônico



Kbase P31854: How to convert a RECID into a DBKey?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   23/09/2010
Status: Verified

GOAL:

How to convert a RECID into a DBKey?

GOAL:

How to use RECID to determine the DBKey?

GOAL:

How to determine DBKey when dealing with RECID?

FACT(s) (Environment):

All Supported Operating Systems
Progress/OpenEdge Product Family

FIX:

The RECID can be used to identify which DBKey the RECID resides in. The formula to calculate this is:

1. RECID converted to binary
2. Determine rec bits for area where RECID is located.

To determine the Rec Bits, use the following code when connected to the database:

FOR EACH _Area WHERE _Area-number > 0.
DISPLAY _Area-name _Area-recbits _Area-Blocksize.

Output looks like the following:

Area-name _Area-recbits Area-blocksize
-----------------------------------------------------------
Control Area 6 8192
Primary Recovery Area 0 8192
Schema Area 6 8192
New Area 6 8192

3. Use Rec Bits to determine lower bits to mask off from the right hand side of the binary number.

Example: RECID = 5305
Rec Bits = 6
RECID Convert to binary = 1010010111001
^^^^^^^
Lower Bits Masked off = 1010010000000

4. Convert the binary number with Lower Bits Masked off, back to decimal which = 5248.