Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Useful info missing from DB2 system catalog

21 views
Skip to first unread message

Jonathan Ball

unread,
Dec 22, 2011, 6:32:10 PM12/22/11
to
SYSCOLUMNS view in QSYS2 can be queried to find columns defined as
VARCHAR, but the row does not contain a metadata column to show the
allocation size of the VARCHAR column. Is there a way to find the
allocation size of a VARCHAR column without doing a DSPFFD on the table
or file?

CRPence

unread,
Dec 22, 2011, 8:24:12 PM12/22/11
to
I noticed the same thing years ago when I was working on the
underlying support for the catalogs and was told that the information
was unnecessary.... Uh heh. I figured though, that they would add the
information the next time the QADBIFLD file in QSYS was modified, but I
seem to recall that although the file was modified, still not to include
that attribute.

Anyhow, perhaps look at possibility for one of the following to
provide that:?

The DESCRIBE TABLE? Doubtful; I do not recall that info there either.
The database retrieve file description QDBRTVFD API?
The SQL generate DDL Generate Data Definition Language (QSQGNDDL) API?

Since the usual desire to have that information is to generate the
DDL from the catalog information, if the API provides the desired result
without the need to access the catalog, then perhaps that is all that is
necessary.?

Regards, Chuck
0 new messages