CL Command Reference - DSPFFD
CL Command List > DSPFFD Reference
Description:
The Display File Field Description (DSPFFD) command shows, prints, or places in a database file field-level information for one or more files in a specific library or all the libraries to which the user has access.
If the information is put in a database file, the database file will have a record format named QWHDRFFD. The fields in record format QWHDRFFD are the same as the fields in the IBM-supplied format QWHDRFFD in file QADSPFFD in the library QSYS. The following information is contained in the database file:
. For each file specified in the command, the database record contains:
每 The name of the file, the name of the library containing the file, the file type, and file member
每 The file creation date and the number of record formats in the file
每 The name of the record format used by the file, the format level identifier, the format text description, the format record length, and the number of fields in the format
每 The information retrieval date and time
. For each field in the record format, the record also contains the following, if applicable:
每 The field name and external field name
每 The type and length of the field
每 For fields referencing other fields, the name of the referenced file, record format, and field; if any attributes of the referenced field were changed, the attribute type is given
每 The edit code, edit word, and column headings associated with the field
每 A signal of whether validity checking is performed on the field
每 The validity check message identifier, the message file, and the library
每 The use of the field
To create an OUTFILE, the user must have object operational authority to the Create Physical File (CRTPF) command and add authority to the library. To use an existing OUTFILE, the user must have object operational and add authority to the file. The user must also have object management and delete authority if *REPLACE is specified on the OUTMBR parameter.
Restrictions:
1. Before users can display each file specified, they must have object operational authority for the file.
2. Also, of the libraries specified by the library qualifier, only the libraries for which the user has read authority are searched.
Examples:
Example 1: Displaying Information About a File on the Local System
DSPFFD FILE(LIB1/FILE2)
This command shows the field-level information about file FILE2 in LIB1 on the local system. The information is shown at the work station where the command was entered.
Example 2: Displaying Information About Files on the Local and Remote Systems
DSPFFD FILE(*ALL/*ALL) SYSTEM(*ALL)
This command shows the field-level information of all files in all libraries authorized to the user on the local system and on all remote systems. For distributed data management files, the display shows only information about the remote file that is named on the RMTFILE parameter of the CRTDDMF command. The information is shown at the work station where the command was entered.
Example 3: Directing Output to a Database File
DSPFFD FILE(QGPL/FLDREF) OUTPUT(*OUTFILE)
OUTFILE(QGPL/FLDREFX)
This command puts the field-level information for the file FLDREF in the QGPL library on the local system into a database file named FLDREFX in the general purpose library, QGPL. The FLDREFX file in the QGPL library can then be processed by a program.