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

Parameters

FILE File

Identifies the file or files to report on. This parameter is required.

Type
*QUAL
Required
Yes
Case
Uppercase
*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

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL

OUTPUT Output

Says where the command output goes.

Type
*CHAR
Required
No
Default
*
Length
8
Case
Uppercase

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.

Type
*QUAL
Required
No
Case
Uppercase
*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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OUTMBR Output member options

Names the file member that receives the output and whether records are replaced or added.

Type
*ELEM
Required
No
Case
Uppercase
*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

Type
*NAME
Required
No
Default
*FIRST
Length
10
Case
Uppercase

Suggested / special values: *FIRST

Replace or add records Replace or add records

Type
*CHAR
Required
No
Default
*REPLACE
Length
8
Case
Uppercase

Allowed values: *REPLACE, *ADD

SYSTEM System

Specifies whether the returned information covers local files, remote files, or both.

Type
*CHAR
Required
No
Default
*LCL
Length
4
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/DSPFFD.json and os/cl/help/DSPFFD.json.