Command to list all Databases (Files and Fields W/Type,Size..etc) on AS400?

I was looking around and was wondering if there is a command or any way to get a list of all Files database Files W/Fields size, type, desc....etc. A creating of a file is prefered but a splf would also be fine. Any info is appreciated :)

                                                  Thanks in advance
Who is Participating?
daveslaterConnect With a Mentor Commented:
another way is using the system maintained QADBIFLD file.
This has all the files, fields etc..

You can write a simple query to show the details you want.

there is a dspffd command that showes fields in a file. There are some utilities out there that put it into a nice format.
pugmi16Author Commented:
Perfect!! Thats exactly what I was looking for as I am building a data Model/Dictionary and needed Files with Fields...etc Thanks
Technically, files such as QADBIFLD shouldn't be directly accessed. Rather, the info should be gathered out of the views that are built over them such as QSYS2/SYSCOLUMNS.

Because QADBIFLD is a physical table maintained by (and technically for) DB2/400, direct access can potentially establish record or member locks that interfere with normal behind-the-scenes database maintenance. IBM supplies various LFs and SQL VIEWs for customer use.

The risk is small and probably getting smaller as each release of OS/400 comes out. But a missing PTF can be enough to result in trouble in the database indices, sometimes requiring RCLSTG *DBXREF to clean up.

All Courses

From novice to tech pro — start learning today.