Kbase P31608: How to convert a RECID to a Database Block number using Records per Block?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/09/2010 |
|
Status: Verified
GOAL:
How to convert a RECID to a database block number using RECID and Records per Block?
GOAL:
How to convert a RECID to a database block number?
GOAL:
How to determine database block number by recid?
GOAL:
How to determine DBKey using RECID?
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
To convert a RECID to a database block number you need to know
the following information:
1. RECID
The RECID will either be available due to your receiving an error
which reports the recid or the result of running code using the
RECID statement to identify a specific recid.
2. Table and area that the RECID is located in.
To determine the table and Area that a RECID is located in, please use
solution:
P29346, "How to determine what Table and Area a RECID exists in?"
3. # of records per block for that Area
Issue the command prostrct list dbname (to update the dbname.st file with
current information). Then either look in the dbname.st file or issue
the prostrct statistics dbname command to determine the # of records per
block.
Example
Command: prostrct list dbname
more dbname.st
d "Cust_Data":9,32 /tmp/me_9.d1 f 320
d "Cust_Data":9,32 /tmp/me_9.d2
^^
OR
Command: prostrct statistics dbname
Database Block Usage for Area: Cust_Data
Active blocks: 184
Empty blocks: 168
Extent blocks: 2
Total blocks: 352
Records/Block: 32 <---- Records per block
The formula for calculating the Database Block # is:
RECID / # Records per Block for the area that the record is located in.
When performing division, only be concerned with whole numbers.
Example: RECID = 13527 / 32 records per block = 422.71875. The addressable
Database Block # is 422.
To determine DBKey take the Database Block # and multiply by
# of records per block.
Example: Database Block # = 422
# of Records per Block is 32
422 x 32 = 13504 DBKey