Command reference / db
DSPFFD
Display File Field Description
Shows, prints, or writes field-level information for one or more files in a given library, or in all libraries the user can access. Output written to a database file uses record format QWHDRFFD, which matches the IBM-supplied QWHDRFFD format in file QADSPFFD in QSYS. Per file it includes the name, library, type, member, creation date, record format count, format name and level identifier, format text, record length, field count, and retrieval date and time. Per field it includes the field name and external name, type and length, referenced file/format/field details, edit code, edit word, column headings, validity-check details, and field use.
Allowed environments: *ALL.
Positional parameters: 2.
Restrictions
- Creating an OUTFILE requires *USE authority to the CRTPF command and *ADD authority on the library. Using an existing OUTFILE requires *OBJOPR and *ADD authority on that file.
- *OBJMGT and *DLT authority are needed if *REPLACE is specified for an outfile member that already exists.
- *OBJOPR authority is needed on the file named in FILE. For a library qualifier, only libraries on which you have *EXECUTE authority are searched.
Parameters
FILE
File
Identifies the file or files to report on. This parameter is required.
*ALL- Qualifier 1: all files in the library are reported. Qualifier 2: all libraries on the system, including QSYS, are searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)
File
File
Suggested / special values:
*ALL
Library
Library
Suggested / special values:
*LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL
OUTPUT
Output
Says where the command output goes.
Allowed values:
*, *PRINT, *OUTFILE
*- Displayed for interactive jobs, or printed with spooled output for batch jobs.
*PRINT- Printed with the job's spooled output.
*OUTFILE- Written to the database file named in the OUTFILE parameter.
OUTFILE
File to receive output
Names the database file that receives the output. If the file does not exist, the command creates it in the specified library.
*LIBL- Library qualifier: the library list is used to find the file; if not found, it is created in the current library, or in QGPL if none is set.
*CURLIB- Library qualifier: the thread's current library is used to find the file; QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)
File to receive output
File to receive output
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OUTMBR
Output member options
Names the file member that receives the output and whether records are replaced or added.
*FIRST- The first member receives the output. If it does not exist, it is created with the name of the outfile. If it exists, you can append to it or clear it first.
*REPLACE- Clears the existing member and adds the new records.
*ADD- Adds the new records to the end of the existing records.
Elements in order
Member to receive output
Member to receive output
Suggested / special values:
*FIRST
Replace or add records
Replace or add records
Allowed values:
*REPLACE, *ADD
SYSTEM
System
Specifies whether the returned information covers local files, remote files, or both.
Allowed values:
*LCL, *RMT, *ALL
*LCL- Local files only.
*RMT- Remote files only.
*ALL- Both local and remote files.
Examples
DSPFFD FILE(LIB1/FILE2)
Shows field-level information for FILE2 in LIB1 on the local system, at the workstation where the command was entered.
DSPFFD FILE(QGPL/FLDREF) OUTPUT(*OUTFILE) OUTFILE(QGPL/FLDREFX)
Writes field-level information for FLDREF in QGPL into a database file named FLDREFX in QGPL, which a program can then process.
Generated from os/cl/catalog/DSPFFD.json and os/cl/help/DSPFFD.json.