ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

View tables and fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • View tables and fields

    I'd like to view a tables fields and field types. What are the commands to access the AS/400 system catalog? Are they executable from the command line?

  • #2
    Re: View tables and fields

    what exactly are you trying to do?

    there is a command to display fields in a specific file
    there is an api to list fields in a specific file
    there is a table on the iseries with all files/fields listed

    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: View tables and fields

      Hi,

      the catalog views are all stored in the QSYS2 library and start with SYS*.
      These catalog views can be accessed like any other view, for example with SQL or Query/400 or with a database management tool, if you have one.

      Table descriptions can be found in the SYSTABLES view and column descriptions (including field names, data types and lengths) in the SYSCOLUMS view. Also information about all DDS described files can be found in the catalog views.

      Birgitta

      Comment


      • #4
        Re: View tables and fields

        DSPFFD will show you columns
        Ben

        Comment


        • #5
          Re: View tables and fields

          If you have TAATOOLS you can do a
          Code:
          DSPFMT MYFILE
          and to view the logicals you can do
          Code:
          DSPACCPTH MYFILE
          That's if you have TAATOOLS...
          Your future President
          Bryce

          ---------------------------------------------
          http://www.bravobryce.com

          Comment


          • #6
            Re: View tables and fields

            Will any of these show relationships, keys or indexes? If so which ones? Thanks for any help you can offer.

            Comment


            • #7
              Re: View tables and fields

              this one if free and on the index page of this very site.

              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: View tables and fields

                If you have Infor S21:
                DSPFLD will display all the fields
                DSPDEP will display all the dependancies
                DSPKEY will display the key incl. select/omit and multiformat logicals
                Regards

                Kit
                http://www.ecofitonline.com
                DeskfIT - ChangefIT - XrefIT
                ___________________________________
                There are only 3 kinds of people -
                Those that can count and those that can't.

                Comment


                • #9
                  Re: View tables and fields

                  iSeries Navigator (Database tab) will also give you lots of information

                  Comment


                  • #10
                    Re: View tables and fields

                    Code:
                    DSPFFD - Display File Field Descriptions (COLUMNS)
                    DSPFD - Display File Description (TABLE/VIEW/INDEX)
                    DSPDBR - Display Database Relations (VIEWS/INDEXES on TABLES)
                    I'm not anti-social, I just don't like people -Tommy Holden

                    Comment


                    • #11
                      Re: View tables and fields

                      For PRMS users the RMSTD library contains the command DSPRCDLYT (Display Record Layout). This is what they use to generate the documentation of file layouts.

                      Additionally from the on the menu RMSTD/TD there is a option to maintain user comments at the file or field level. These comments are optionally printed wth DSPRCDLYT. Handy for documenting their obscure code meanings and your modificaitons. Unfortuantely the comment file is shipped empty.
                      Denny

                      If authority was mass, stupidity would be gravity.

                      Comment

                      Working...
                      X