information presented by DSPFD command - IBM AS400
This is a discussion on information presented by DSPFD command - IBM AS400 ; Hello,
I received SQL0803 message durring update of table T. Unique index or unique
constraint exists. SYSCSTDEP and SYSINDEXES catalog views contain no
information for constraint and index. However, using DSPDBR and DSPFD
command, I found information about unique key ...
-
information presented by DSPFD command
Hello,
I received SQL0803 message durring update of table T. Unique index or unique
constraint exists. SYSCSTDEP and SYSINDEXES catalog views contain no
information for constraint and index. However, using DSPDBR and DSPFD
command, I found information about unique key values required for logical
files related to table/file T.
Which catalogs view contains information related to data presented by DSPFD
for logical file ?
regards
Pegaz.
-
Re: information presented by DSPFD command
The SQL catalog VIEWs SYSCSTDEP and SYSCST should include the
constraints. The TABLE where the data comes from is the System Database
Cross-Reference file QADBFCST in QSYS; shown in the CREATE VIEW
statement text for those VIEWs.
A unique index, unless it is a SQL INDEX, does not appear in
SYSINDEXES. According to the CREATE VIEW statement text, the selection
from the System Database Cross-Reference file QADBXREF in QSYS has in
its WHERE clause: DBXATR = 'IX'
I infer from the scenario that there may be an intermixing of SQL and
DDS created logical files; that the unique logical file is DDS created,
rather than an SQL INDEX. To include both SQL and DDS created files in
a query of the database cross-reference, create a different VIEW to be
referenced [a VIEW which does not exclude non-SQL objects], query the
Database Cross-References files directly, or refer to the
self-describing information extracted from the objects themselves [e.g.
the DSPDBR and DSPFD; or equivalent APIs],
Regards, Chuck
--
All comments provided "as is" with no warranties of any kind
whatsoever and may not represent positions, strategies, nor views of my
employer
Pegaz wrote:
> I received SQL0803 message during update of table T. "Unique index
> or unique constraint exists". SYSCSTDEP and SYSINDEXES catalog views
> contain no information for constraint and index. However, using
> DSPDBR and DSPFD command, I found information about unique key
> values required for logical files related to table/file T.
>
> Which catalogs view contains information related to data presented
> by DSPFD for logical file ?