How to show table Constraints on AS/400

AS/400 DB2
AS400 Data Definitions
as400/DB2 - Trigger - Comit
Hello masters, I want to show table constraints on as400 database.I asked somebody people and they are said me; "Do not show (constraints - table relations) on AS/400". I don't believe that. And now asked

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

Thank you for your answers.

Software/Hardware used:

Answer Wiki

Thanks. We'll let you know when a new response is added.



Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • WaltZ400
    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.
    655 pointsBadges:
  • TomLiotta
    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
    125,585 pointsBadges:
  • HBurakKaradag
    Thank you so much.I tested and write here...
    15 pointsBadges:
  • TomLiotta

    But it depends on what you mean by "show".

    If you are investigating database constraints, you possibly should drill into iSeries Navigator, Databases-> {databasename}-> Schemas-> {schemaname}-> Constraints.

    Constraints for the selected schema should be listed.


    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: