Command reference / db

DSPFD

Display File Description

Shows one or more types of information from the file descriptions of database and/or device files. Information is provided for each matching file in the libraries named by the library qualifier that the user can access. Output can be shown, printed, or written to a database output file (OUTFILE).

Allowed environments: *ALL. Positional parameters: 3.

Restrictions

Parameters

FILE File

Specifies the name and library of the files. The name can be a full file name, a generic name, or *ALL.

Type
*QUAL
Required
Yes
Case
Uppercase
*ALL
As a file name, information is provided for all files in the library or libraries. As a library qualifier, all libraries in the system, including QSYS, are searched.
*LIBL
All libraries in the thread's library list are searched until the first match is found.
*CURLIB
The current library for the thread is searched. If none is set, the QGPL library is searched.
*USRLIBL
The current library and the user portion of the library list are searched. If no current library entry exists, only the user portion is searched.
*ALLUSR
All user libraries are searched: libraries not beginning with Q, except #CGULIB, #DSULIB, #SEULIB, #COBLIB, #RPGLIB, #DFULIB, and #SDALIB, plus the listed IBM-provided Q libraries that hold frequently changing user data, such as QGPL and QSYS2.
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

TYPE Type of information

Specifies the type of file information provided. *ALL applies only to display or print, *BASATR only to an output file, and other values can be repeated when displaying or printing.

Type
*CHAR
Required
No
Default
*ALL
Length
8
List limit
10
Case
Uppercase

Allowed values: *ALL, *BASATR, *ATR, *ACCPTH, *MBRLIST, *SELECT, *SEQ, *RCDFMT, *MBR, *SPOOL, *JOIN, *TRG, *CST, *NODGRP

*ALL
All applicable types of information are shown or printed. Cannot be used when OUTFILE is specified.
*BASATR
File-level attribute information common to all files is shown.
*ATR
Attribute information meaningful for the specified file is provided.
*ACCPTH
Access paths for physical and logical files are provided. For keyed access paths, the composite key description is also shown.
*MBRLIST
An alphabetical list and brief description of all file members is provided.
*SELECT
The select/omit attribute for logical files is provided.
*SEQ
The collating sequence for physical and logical files is provided.
*RCDFMT
The record format names and record format level information are provided.
*MBR
Information about the file members in physical and logical files is provided.
*SPOOL
The spooling attributes for the specified diskette or printer file are provided.
*JOIN
The join from-file, join to-file, and join fields for join logical files are provided.
*TRG
Trigger program count, names and libraries, and trigger events, times, and update conditions are provided. Output format QWHFDTRG from system file QAFDTRG.
*CST
For physical files only, constraint relationships are provided. Output format QWHFDCST from system file QAFDCST.
*NODGRP
For distributed physical files only, data partitioning and relational database information copied from a node group at file creation is provided. Output format QWHFDNGP from system file QAFDNGP.

OUTPUT Output

Specifies where the command output is sent: displayed or printed with the job's spooled output, or directed to the OUTFILE database file.

Type
*CHAR
Required
No
Default
*
Length
8
Case
Uppercase

Allowed values: *, *PRINT, *OUTFILE

*
Displayed if requested by an interactive job, or printed with the job's spooled output if requested by a batch job.
*PRINT
Printed with the job's spooled output.
*OUTFILE
Directed to the database file named on the OUTFILE parameter.

FILEATR File attributes

Specifies the type of file whose attributes are shown. It must be specified only when TYPE(*ATR) is used, and can be repeated.

Type
*CHAR
Required
No
Default
*ALL
Length
5
List limit
12
Case
Uppercase

Allowed values: *ALL, *DSPF, *PRTF, *DKTF, *TAPF, *CMNF, *BSCF, *MXDF, *PF, *LF, *SAVF, *DDMF, *ICFF

*ALL
The attributes of all files are provided. Not allowed when OUTFILE is specified together with TYPE(*ATR).
*DSPF
The attributes of display files are provided.
*PRTF
The attributes of printer files are provided.
*DKTF
The attributes of diskette files are provided.
*TAPF
The attributes of tape files are provided.
*CMNF
The attributes of communications files are provided.
*BSCF
The attributes of BSC files are provided.
*MXDF
The attributes of mixed files are provided.
*PF
The attributes of physical files are provided.
*LF
The attributes of logical files are provided.
*ICFF
The attributes of ICF files are provided.
*SAVF
The attributes of save files are provided.
*DDMF
The attributes of Distributed Data Management (DDM) files are provided.

OUTFILE File to receive output

Specifies the database file that receives the command output. If it does not exist, the command creates it in the specified library.

Type
*QUAL
Required
No
Case
Uppercase
*LIBL
The library list is used to locate the file. If not found, it is created in the current library, or in QGPL if no current library exists.
*CURLIB
The current library for the thread is used to locate the file. If none is set, the QGPL library is used.
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

Specifies the database file member that receives the output and whether new records replace or are added to existing records.

Type
*ELEM
Required
No
Case
Uppercase
*FIRST
The first member in the file receives the output. If it does not exist, a member named after the OUTFILE file is created.
*REPLACE
The existing member is cleared and the new records are added.
*ADD
The new records are added 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 is about files on the local system, on remote systems, or on both.

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

Allowed values: *LCL, *RMT, *ALL

*LCL
The information returned is about local files only.
*RMT
The information returned is about remote files only.
*ALL
The information returned is about both local and remote files.

Examples

DSPFD FILE(*ALL/FILE1)

Shows the definition of FILE1 in all libraries authorized for the user on the local system, displayed at the work station running the command.

DSPFD FILE(LIBRARY1/FILE1)

Shows the definition of FILE1 in LIBRARY1. If FILE1 is a DDM file, only the attributes of the local DDM file are shown.

IBM command documentation

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