Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Display Program References (DSPPGMREF) command provides a list of the system objects referred to by the specified programs. The following list shows the system objects provided for the respective program types:
This information can be displayed, printed, or placed in a database output file.
If the information is shown or printed, a list (by library) of the specified user-authorized programs, along with the objects referenced by each program, is created. For files, information about how each file is used (input, output, update, unspecified, or any combination of these four) is also shown or printed.
If the information is written to a database file, the database file will have a record format named QWHDRPPR. The fields in record format QWHDRPPR are the same as the fields in the IBM-supplied format QWHDRPPR in file QADSPPGM in the library QSYS. The following information is contained in the database file:
For files, the record contains the following additional fields:
Note: This command lists which objects are referenced when the object is created or updated using UPDPGM or UPDSRVPGM. The referenced object names and libraries listed may be different than the actual names of the objects, since this information is stored when the program is created. Entries can be added as the ILE program or service program is updated using UPDPGM or UPDSRVPGM, but entries are never removed. If the object has been moved since the program was created, or an override was in effect during creation, the names listed may differ from the actual names.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
PGM | Program | Qualified object name | Required, Positional 1 |
Qualifier 1: Program | Generic name, name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL | ||
OUTPUT | Output | *, *PRINT, *OUTFILE | Optional, Positional 2 |
OBJTYPE | Object type | Single values: *ALL Other values (up to 4 repetitions): *PGM, *SQLPKG, *SRVPGM, *MODULE |
Optional |
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 |
Top |
Specifies the name and library of the programs whose information is shown.
This is a required parameter.
The possible values for program name are:
Qualifier 2: Library
#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 QUSRIJS QUSRVxRxMx QGPL QSRVAGT QUSRINFSKR QGPL38 QSYS2 QUSRNOTES QMGTC QSYS2xxxxx QUSROND QMGTC2 QS36F QUSRPOSGS QMPGDATA QUSER38 QUSRPOSSA QMQMDATA QUSRADSM QUSRPYMSVR QMQMPROC QUSRBRM QUSRRDARS QPFRDATA QUSRDIRCL QUSRSYS QRCL QUSRDIRDB QUSRVI
Top |
Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.
Top |
Specifies the object type for which information is displayed.
The possible values are:
Top |
Specifies the name and library of the database output file to which the output of the command is directed. If the file does not exist, this command creates a database output file in the specified library.
The possible library values are:
Note: The outfile format must be the same as QWHDRPPR of the system file QADSPPGM. More information on the OUTFILE format is in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter book.
Top |
Specifies the name of the database file member that receives the output of the command.
The possible values are:
The possible values for how information is stored are:
Top |
Example 1: Storing a List of Programs
DSPPGMREF PGM(LIBRARY1/*ALL) OUTPUT(*OUTFILE) OUTFILE(LIB2/FILE2)
This command creates a list of all authorized programs found in LIBRARY1, and of the files and other system objects that the programs reference. It stores the list in a database file named FILE2 in LIB2.
Example 2: Printing a List of Objects
DSPPGMREF PGM(LIBRARY1/BILLING) OUTPUT(*PRINT)
This command creates a list of system objects that are referenced by the BILLING program in LIBRARY1. The output is spooled for printing.
Top |
*ESCAPE Messages
Top |