Display File Description (DSPFD)
|Where allowed to run: All environments (*ALL)
The Display File Description (DSPFD) command shows one or more types of information retrieved from the file descriptions of one or more database and/or device files. The information is provided for each file that has the specified name and that is found in the libraries named in the specified library qualifier to which the user has access. The information can be shown, printed, or directed to a database output file (OUTFILE). More information on files used by the DSPFD command is in the Database category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
- Before the specified files can be shown, the user must have object operational authority to those files.
- Of the libraries identified by the library qualifier, only libraries to which the user has read authority are searched for the specified files.
- If TYPE(*ALL), TYPE(*MBR), or TYPE(*MBRLIST) is specified and if the file is a physical file, the user needs at least one data authority (read, write, update, or delete) to the file to receive information about the members.
|FILE||File||Qualified object name||Required, Positional 1|
|Qualifier 1: File||Generic name, name, *ALL|
|Qualifier 2: Library||Name, *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL|
|TYPE||Type of information||Single values: *ALL, *BASATR
Other values (up to 10 repetitions): *ATR, *ACCPTH, *MBRLIST, *SELECT, *SEQ, *RCDFMT, *MBR, *SPOOL, *JOIN, *TRG, *CST, *NODGRP
|Optional, Positional 2|
|OUTPUT||Output||*, *PRINT, *OUTFILE||Optional, Positional 3|
|FILEATR||File attributes||Single values: *ALL
Other values (up to 12 repetitions): *DSPF, *PRTF, *DKTF, *TAPF, *CMNF, *BSCF, *MXDF, *PF, *LF, *SAVF, *DDMF, *ICFF
|OUTFILE||File to receive output||Qualified object name||Optional|
|Qualifier 1: File to receive output||Name|
|Qualifier 2: Library||Name, *LIBL, *CURLIB|
|OUTMBR||Output member options||Element list||Optional|
|Element 1: Member to receive output||Name, *FIRST|
|Element 2: Replace or add records||*REPLACE, *ADD|
|SYSTEM||System||*LCL, *RMT, *ALL||Optional|
Specifies the name and library of the files.
This is a required parameter.
The possible values for file names are:
- Specify the full name of the file. Information is shown for this file only.
- Specify a generic name. Information is provided for all files whose names begin with the specified characters.
- Information is provided for all files in the library or libraries.
Qualifier 2: Library
- All libraries in the library list for the current thread are searched until the first match is found.
- If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are searched. If there is no current library entry, only the libraries in the user portion of the library list are searched.
- The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
- All libraries in the system, including QSYS, are searched.
- All user libraries are searched. All libraries with names that do not begin with the letter Q are searched except for the following:
#CGULIB #DSULIB #SEULIB #COBLIB #RPGLIB #DFULIB #SDALIB
Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered user libraries and are also searched:
QDSNX QRCLxxxxx QUSRDIRDB QUSRVI QGPL QSRVAGT QUSRIJS QUSRVxRxMx QGPL38 QSYS2 QUSRINFSKR QMGTC QSYS2xxxxx QUSRNOTES QMGTC2 QS36F QUSROND QMPGDATA QUSER38 QUSRPOSGS QMQMDATA QUSRADSM QUSRPOSSA QMQMPROC QUSRBRM QUSRPYMSVR QPFRDATA QUSRDIRCF QUSRRDARS QRCL QUSRDIRCL QUSRSYS
- 'xxxxx' is the number of a primary auxiliary storage pool (ASP).
- A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.
- Specify the name of the library to be searched.
Type of information (TYPE)
Specifies the type of file information provided. *ALL is valid only if information is displayed or printed. *BASATR is valid only if information is stored in a database output file. For the other parameters, one or more values can be specified if information is shown or printed. Only one value can be specified if information is stored in a database output file.
The possible values are:
- All the types of information applicable to the specified files are shown or printed.
Note: *ALL cannot be specified if a file name is specified on the OUTFILE parameter.
- The file level attribute information common to all files is shown.
- Attribute information meaningful for the specified file is provided.
- Access paths for physical and logical files are provided. For keyed access paths, the composite key description is also shown.
- An alphabetical list and brief description of all file members in the specified file is provided.
- The select/omit attribute for logical files is provided.
- The collating sequence for physical and logical files is provided.
- The record format names and record format level information for the specified file are provided.
- Information about the file members in physical and logical files is provided.
- The spooling attributes for the specified diskette or printer file are provided.
- The join from-file, the join to-file, and the fields involved in the join are provided for join logical files.
- The number of trigger programs, each trigger program name and library, and the trigger events, trigger times, and trigger update conditions for each file with a trigger are provided. The correct output file format is QWHFDTRG from system file QAFDTRG.
- For physical files only, information about the constraint relationships associated with the file is provided. The correct output file format is QWHFDCST from the system file QAFDCST.
- For distributed physical files only, data partitioning and relational data base information copied from a node group (*NODGRP) at file creation time is provided. The correct output file format is QWHFDNGP from the system file QAFDNGP.
Specifies where the output from the command is sent.
- The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
- The output is printed with the job's spooled output.
- The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.
File attributes (FILEATR)
Specifies the type of file whose attributes are shown. For remote files, the only parameters allowed are *PF, *LF, or *ALL.
The possible values are:
- The attributes of all files are provided. This parameter is not allowed if *OUTFILE is specified on the Output prompt (OUTPUT parameter), and *ATR is specified on the Type of information prompt (TYPE parameter).
- The attributes of display files are provided.
- The attributes of printer files are provided.
- The attributes of diskette files are provided.
- The attributes of tape files are provided.
- The attributes of communications files are provided.
- The attributes of BSC files are provided.
- The attributes of mixed files are provided.
- The attributes of physical files are provided.
- The attributes of logical files are provided.
- The attributes of ICF files are provided.
- The attributes of save files are provided.
- The attributes of the Distributed Data Management (DDM) files are provided.
File to receive output (OUTFILE)
Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.
Qualifier 1: File to receive output
- Specify the name of the database file to which the command output is directed.
Qualifier 2: Library
- The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.
- The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.
- Specify the name of the library to be searched.
Note: If a new file is created, the system uses as a model one of the following output files in QSYS with one of the following format names, depending on the values specified on the Type of information prompt (TYPE parameter) and the File attributes prompt (FILATR parameter). For more information about the OUTFILE format, refer to Database category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Command Parameters Output File Created TYPE FILEATR OUTFILE FORMAT *BASATR Note 1 QAFDBASI QWHFDBAS *ATR *BSCF QAFDBSC QWHFDBSC *ATR *CMNF QAFDCMN QWHFDCMN *ATR *DSPF QAFDDSP QWHFDDSP *ATR *PRTF QAFDPRT QWHFDPRT *ATR *DKTF QAFDDKT QWHFDDKT *ATR *TAPF QAFDTAP QWHFDTAP *ATR *PF QAFDPHY QWHFDPHY *ATR *LF QAFDLGL QWHFDLGL *ATR *ICFF QAFDICF QWHFDICF *ATR *SAVF QAFDSAV QWHFDSAV *ATR *DDMF QAFDDDM QWHFDDDM *ACCPTH Note 2 QAFDACCP QWHFDACP *SELECT Note 3 QAFDSELO QWHFDSO *SEQ Note 2 QAFDCSEQ QWHFDSEQ *MBR Note 2 QAFDMBR QWHFDMBR *SPOOL Note 4 QAFDSPOL QWHFDSPL *RCDFMT Note 1 QAFDRFMT QWHFDFMT *MBRLIST Note 2 QAFDMBRL QWHFDML *JOIN Note 5 QAFDJOIN QWHFDJN
Note: You must specify the FILEATR parameter only when TYPE(*ATR) is used. The default of FILEATR(*ALL) is valid on any of the other TYPE values as long as you are requesting file types that match the appropriate request.
- Any entry or multiple entries may be made in the FILEATR parameter.
- Only for physical and logical files.
- Only for logical files.
- Only for device files.
- Only for join logical files.
Output member options (OUTMBR)
Specifies the name of the database file member that receives the output of the command.
Element 1: Member to receive output
- The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.
- Specify the name of the file member that receives the output. If it does not exist, the system creates it.
Element 2: Replace or add records
- The system clears the existing member and adds the new records.
- The system adds the new records to the end of the existing records.
Specifies whether the information that is returned is about files on the local system or files on remote systems.
The possible values are:
- The information returned is about local files only.
- The information returned is about remote files only.
- The information returned is about both local and remote files.
Example 1: Displaying Definition of a File
This command shows the definition of FILE1 as defined in all libraries authorized for the user on the local system. The information is displayed at the work station running the command.
Example 2: Displaying Attributes of Local DDM File
This command shows the definition of FILE1 as defined in LIBRARY1. If FILE1 is a Distributed Data Management (DDM) file, only the attributes of the local DDM file are shown at the work station running the command.
Example 3: Displaying Definition of All Files
DSPFD FILE(*ALL/*ALL) TYPE(*ALL) SYSTEM(*ALL)
This command shows the definition of all the files in all libraries authorized for the user on both the local and on all remote systems. For DDM files, the displays first show information about the local DDM file and then, if available, information about the remote file that is named on the RMTFILE parameter of that CRTDDMF command. The information is shown at the work station running the command.
- TYPE not found for file &1 in library &2.
- File &1 in library &2 not found.
- No file specified as &1 in &2 can be displayed.
- No files in &1 in &2 have the specified FILEATR.
- File &1 not allowed with SYSTEM(*RMT).
- SYSTEM(*RMT) not allowed for files &1 in &2.
- &3 records added to member &4 in file &1 in &2.
- Record format &3 not found for outfile &1.
- Library &1 not found.
- Error while opening file &1 in &2.
- Error while writing to file &1 in &2.
- Error while closing file &1 in &2.
- Error creating member &3 in file &1.
- File &1 in &2 is a system file.
- Not authorized to library &1.
- Library &1 not available.
- Error occurred when on display.
- Error occurred when canceling display.
- Error clearing member &3 in file &1.
- Damage to file &1 in library &2.
- Overflow value for file &1 in &2 too small.
- Page size too narrow for file &1 in &2.
- Error occurred during processing of command.