15 pts.
 How to show table Constraints on AS400
Hello masters, I wantto show table constraints on as400 database.I asked somebody people and they are said me; "Do not show (constraints - table relations) on AS400".I dont belive that.And now asked

How to show table constraints - relations on as400 I'm very curious about the answer to this question

Thank you for your answers.



Software/Hardware used:
AS400
ASKED: December 6, 2011  3:06 PM
UPDATED: March 19, 2012  1:21 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Michael Tidmarsh   11,390 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can display file constarints on of two ways.

The first way is to execute command DSPFD in the format of ‘DSPFD filename *CST’. This displays all of the constraints for a particular file.

If you want to do a report of all files in a given library and you have the correct authority, in library QSYS are two files that are maintained by the OS. As a constraint is added to or maintained on a file, files QADBFCST and file QADBCCST are updated. File QADBFCST shows general information regarding each constraint on any file on the system. File QADBCCST shows the fields in the files that are invloved in the constraint. Using AS/400 query or SQL you can link these two files together and get a compelete listing of all the constraint information on every file in a library.

 645 pts.

 

The physical files QADBFCST and QADBCCST in QSYS should not be directly referenced at all. Instead, use the views that IBM provides for this in QSYS2 (or SYSIBM). The DSPDBR (Display Database Relations) command can show names and locations of appropriate views.

The physical files should be reserved for use by DB2 itself.

Tom

 107,995 pts.

 

Thank you so much.I tested and write here…

 15 pts.