When you want to display the field definitions from a file, you type DSPFFD. When you want to print them, you could use the same command. Even if you want the output stored in a file, to be able to format the output yourself (using Query, or download the output to MS Word or MS EXCEL, for example), you can use the same command. However, the information you are looking for is already stored in system files. These files are located in QSYS, and contain all the information about your databases you will ever need.
To prevent an information overload you can use the views, stored in QSYS2. Viewnames are SYSTABLES, SYSCOLUMNS, SYSVIEWDEPS, and there are many more. You can access these views using Query or SQL. The system maintains the system catalog, so each time a table is created or altered, or a locical file is made, the system catalog is updated. When you use SQL to create your databases ('create database' instead of 'crtlib'), additional views are created in your library. These views are actually a subset based on the system views, selecting only the database objects within your library.
So why not use the system catalog instead of dsp...-commands.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: Tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Read this Search400 Featured Topic: Managing your iSeries.
Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.