Display of Db2 catalog columns
In some cases, Db2 Admin Tool displays the values of Db2 catalog columns differently than Db2 to improve readability.
Db2 Admin Tool has the following differences in displaying catalog column values:
- If a catalog column value is null, Db2 Admin Tool displays a question mark character (?).
- Db2 Admin Tool handles pairs of INTEGER and
FLOAT columns differently than Db2 does.
In some Db2 catalog tables, when a column with an INTEGER data type became too small to hold large values, Db2 added a corresponding column with a FLOAT data type to the catalog table to replace the INTEGER column. For example, CARDF was added for CARD in SYSTABLES, and FIRSTKEYCARDF was added for FIRSTKEYCARD in SYSINDEX. Db2 catalog tables (Db2 13 for z/OS) shows that the INTEGER version of the column is no longer used. When the catalog table is queried by a SELECT* statement in SPUFI , the value for the unused column might be displayed as 0 or -1.
For readability, Db2 Admin Tool displays in the INTEGER column the integer equivalent of the value that is in the FLOAT column if the value fits. If the value is too large, Db2 Admin Tool displays 11 asterisks instead.
The following columns contain the corresponding integer value of the floating point column when the floating point column is also included in the SELECT list:- CARD
- COLCARD
- FIRSTKEYCARD
- FULLKEYCARD
- FREQUENCY
- FAROFFPOS
- NEAROFFPOS
- NACTIVE
- NPAGES
- SPACE
- KEYCOUNT
- CLUSTERRATIO
These integer columns must be returned by Db2 as INTEGER NOT NULL.
Within a SELECT statement in Db2 Admin Tool, use one of the following methods to get the real value from the Db2 catalog:- Do not specify both the integer and floating point column in the SELECT list.
- Rename one of the columns in the SELECT list by using AS. For example:
SELECT CARD AS MYCARD
. - Change the data type in the result. For example:
SELECT DECIMAL(COLCARD,11,0)