CL Command Reference - DSPDBR
CL Command List > DSPDBR Reference
Description:
The Display Database Relations (DSPDBR) command provides relational information about database files. It identifies the physical and logical files dependent on a specific file, files that use a specific record format, or the file members that are dependent on a specific file member. The information can be displayed, printed, or placed in a database output file. This command does not apply to device files.
If the information is put in a database output file, the record format that is used is named QWHDRDBR. The fields in record format QWHDRDBR are the same as the fields in the IBM-supplied format QWHDRDBR in file QADSPDBR in the library QSYS. The following information is contained in the database output file:
. For each file specified in the command, the database record contains:
每 The name of the specified file, its library name, and the file type of the specified file
每 The name of the record format used for the file, if a name is specified for RCDFMT
每 The information retrieval date(s) for the file information; the latest date contains the most accurate information, if changes have been made to the files
. One of the following is also included in the record:
每 The names of all the files that are dependent on the specified file for access path sharing or data sharing; the names of the libraries containing the files and the type of sharing are also included
每 The names of all the file members that are dependent on the specified member, their library names, and the type of sharing
每 The names of all the files that are dependent on the specified record format, and their library names
Restrictions:
1. To show each file specified, the user 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 *USE authority are searched for the files.
2. To create an OUTFILE, the user must have *USE authority to the Create Physical File (CRTPF) command and *ADD authority to the library. To use an existing OUTFILE, the user must have operational (*OPR) and *ADD authority to the file.
3. The user must have object management and delete authority also, if *REPLACE is specified.
Examples:
In the following examples, assume that there is an interactive environment and that the user of the command is authorized to access all relevant libraries and objects.
Example 1: Displaying Database Relations Information
DSPDBR FILE(LIBRARY1/FILE1) RCDFMT(FORMAT1)
This command shows a list of the names and database relations information for all files that use the FORMAT1 format and are associated with FILE1 in LIBRARY1. Because the environment is interactive, the output is shown at the work station running this command.
Example 2: Displaying Database Relations Information
DSPDBR FILE(LIB1/FILE1)
This command shows database relations information for all files that are dependent on FILE1 in LIB1 for data sharing. It is shown at the work station running this command.
Example 3: Displaying Database Relations Information
DSPDBR FILE(LIB1/FILE1) MBR(MEMBER1)
This command shows database relations information for all members that are dependent on MEMBER1 in FILE1 in LIB1 for data sharing or access path sharing. They are shown at the work station running this command.