How to convert page number and line index of a DBKEY to hexadecimal format.
E.g. With radix 6, page number 5081790, line index 20.
Component: CA IDMS/DB
Release: 19.0
Almost every IDMS installation uses the default radix of 8, so that the page number fits neatly in the first three bytes of a dbkey and the line index is in the fourth byte.
Decimal value of the dbkey = page-number * ( 2 ** radix ) + line index.
With above example
page-number * ( 2 ** 6 ) + line index
page-number * 64 + line index
5081790 * 64 + 20 = 325234580.
Then convert 325234580 to hexadecimal: x'1362AF94'.
PAGE-INFO is not changed if the call to the DBMS results in a non-zero status.
The db-key radix portion of the page information can be used in interpreting a db-key for display purposes and in formatting a db-key from page and line numbers. The db-key radix represents the number of bits within a db-key value that are reserved for the line number of a
record.
For example, if the db-key radix is 4, divide the db-key value by 2**4. The resulting value is the page number of the db-key.
The result would be the line number of the db-key. The following two formulas can be used to
calculate the page and line numbers from a db-key value:
Page-number = db-key value / (2 ** db-key radix)
Line-number = db-key value - (page-number * ( 2 ** db-key radix))
For more information refer to Database Keys