How to show table Constraints on AS/400

15 pts.
Tags:
AS400 Data Definitions
as400/DB2
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:
AS400
ASKED: December 6, 2011  3:06 PM
UPDATED: April 15, 2014  11:14 AM

Answer Wiki

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

Hi,

Try QSYS/WRKPFCST FILE(LIBRARY/FILE)

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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:
    report
  • 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:
    report
  • HBurakKaradag
    Thank you so much.I tested and write here...
    15 pointsBadges:
    report
  • 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.

    Tom

    125,585 pointsBadges:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following