Display File Field Description (DSPFFD)
Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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
Restrictions:
- To create an OUTFILE, you must have *USE authority to the Create Physical File (CRTPF) command and add (*ADD) authority to the library. To use an existing OUTFILE, the user must have object operational (*OBJOPR) and *ADD authority to the file.
- You must have object management (*OBJMGT) and delete (*DLT) authority if *REPLACE is specified for the outfile member and the file member already exists.
- You must have *OBJOPR authority for the file specified for the FILE parameter. Also, of the libraries specified by the library qualifier, only the libraries for which you have execute (*EXECUTE) authority are searched.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | File | Qualified object name | Required, Positional 1 |
Qualifier 1: File | Generic name, name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL | ||
OUTPUT | Output | *, *PRINT, *OUTFILE | Optional, Positional 2 |
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 |
Top |
File (FILE)
Specifies the files for which field information is returned.
This is a required parameter.
Qualifier 1: File
- *ALL
- All files in the library or libraries have their information shown.
- name
- Specify the full name of a file. Only information for the specified file is returned.
- generic-name
- Specify a generic name. Information is provided for all files whose names begin with the specified characters.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- 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.
- *USRLIBL
- 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.
- *ALLUSR
- 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.
- *ALL
- All libraries in the system, including QSYS, are searched.
- name
- Specify the name of the library to be searched.
Top |
Output (OUTPUT)
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.
- *OUTFILE
- The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.
Top |
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
- name
- Specify the name of the database file to which the command output is directed.
Qualifier 2: Library
- *LIBL
- 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.
- *CURLIB
- 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.
- name
- Specify the name of the library to be searched.
Note: The outfile format must be the same as QWHDRFFD of system file QADSPFFD. For more information on the outfile format, refer to Database category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Top |
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
- *FIRST
- 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.
- name
- 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
- *REPLACE
- The system clears the existing member and adds the new records.
- *ADD
- The system adds the new records to the end of the existing records.
Top |
System (SYSTEM)
Specifies whether the information that is returned is about files on the local system or files on remote systems.
- *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.
Top |
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.
Top |
Error messages
*ESCAPE Messages
- CPF3012
- File &1 in library &2 not found.
- CPF3014
- No file specified as &1 in &2 can be displayed.
- CPF3024
- File &1 not allowed for SYSTEM(&3).
- CPF3052
- Description for file &1 not available.
- CPF3061
- Record format &3 not found for outfile &1.
- CPF3063
- Output file &1 in &2 not physical file.
- CPF3064
- Library &1 not found.
- CPF3066
- Error creating output file &1 in &2.
- CPF3067
- Error while opening file &1 in &2.
- CPF3068
- Error while writing to file &1 in &2.
- CPF3069
- Error while closing file &1 in &2.
- CPF3070
- Error creating member &3 in file &1.
- CPF3072
- File &1 in &2 is a system file.
- CPF3074
- Not authorized to library &1.
- CPF3075
- Library &1 not available.
- CPF3076
- Error occurred when on display.
- CPF3077
- Error occurred when canceling display.
- CPF3084
- Error clearing member &3 in file &1.
- CPF326B
- Damage to file &1 in library &2.
- CPF9851
- Overflow value for file &1 in &2 too small.
- CPF9852
- Page size too narrow for file &1 in &2.
- CPF9899
- Error occurred during processing of command.
Top |