DSPFFD (Display File Field Description) Command Description
Purpose
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
To create an OUTFILE, the user must have object operational authority to the Create Physical File (CRTPF) command and add authority to the library. To use an existing OUTFILE, the user must have object operational and add authority to the file. The user must also have object management and delete authority if *REPLACE is specified on the OUTMBR parameter.
Restrictions:
- Before users can display each file specified, they must have object operational authority for the file.
- Also, of the libraries specified by the library qualifier, only the libraries for which the user has read authority are searched.
Required Parameter
- FILE
- Specifies the qualified name of the file or the generic name of several files that have their field-level descriptions shown. This parameter specifies that all files in the specified library or libraries (*LIBL/*ALL for example), or that all files in all libraries (*ALL/*ALL), have their field-level descriptions shown.
Note: The user must have authority to both the files and the libraries before this information is shown. The name of the file field description can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
*USRLIBL: Only the libraries in the user portion of the job's library list are searched.
*ALL: All libraries in the system, including QSYS, are searched.
library-name: Specify the name of the library to be searched.
*ALL: All files in the library or libraries specified have their field-level information shown.
generic*-file-name: Specify the generic name of the file or files that have field-level information shown. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. For more information on the use of generic names, refer to generic names.
file-name: Specify the name of the file whose field-level information is shown.
Optional Parameters
- OUTPUT
- Specifies whether the output from the command is shown at the requesting work station, printed with the job's spooled output, or placed in a database outfile. More information on this parameter is in commonly used parameters.
*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
*PRINT: The output is printed with the job's spooled output.
*OUTFILE: The output is directed to the database file specified on the OUTFILE parameter.
- OUTFILE
- Specifies the qualified name of the database file where the displayed information is stored.
When creating the database output file, the current date, time, and system name must be included. The system name is the name of the source system, not the target system. If the specified output file does not exist, then the system creates a database file and member. If the file is created, the text is OUTFILE for DSPFFD and the public authority is *EXCLUDE.
Note: The outfile format must be the same as QWHDRFFD of system file QADSPFFD. For more information on the outfile format, refer to Database Programming topic in the Information Center. The name of the database file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
database-file-name: Specify the name of the database file where the field level information is written. If no file is found by that name, a file by that name is created and stored in the specified library, or in *CURLIB if the file name is not qualified. This file can be used again when other DSPFFD commands are entered. The IBM-supplied database file QADSPFFD cannot be specified.
- OUTMBR
- Specifies the name of the database file member to which the output is directed.
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 on the OUTFILE parameter. If the member exists, the user has the option to add records to the end of the existing member or to clear the existing member and then add the new records.
member-name: Specify the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.
Element 2: Operation to Perform on Member
*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.
- SYSTEM
- Specifies whether the information returned by the DSPFFD command is about files on the local system (*LCL), about files on the remote system or systems (*RMT), or about files on both local and remote systems (*ALL). For performance considerations, unless explicitly looking for information about files on systems other than the local system, the default value of *LCL should not be changed.
*LCL: The information provided is about local files only.
*RMT: The information provided is about remote files that have been named on the RMTFILE parameter of successfully run CRTDDMF commands. To look at this information, specify the name of the distributed data management file, not the name of the remote file. Only the information returned by the remote system is shown.
*ALL: The information provided is about files on both the local and the remote systems. For DDM files, the displays show only information about the remote file that was named on the RMTFILE parameter of the CRTDDMF command.
Examples for DSPFFD
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.
Error messages for DSPFFD
*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.