Command reference / prog
DSPPGMREF
Display Program References
Lists the system objects referred to by the specified programs. The object types listed depend on the program type; for example, BAS and PLI list files and programs, CLE lists service programs, RPG lists files, data areas and programs, and C and PAS programs provide no information. The output can be displayed, printed, or written to a database file with format QWHDRPPR. When shown or printed, programs are grouped by library with their referenced objects, and each file's use (input, output, update, unspecified) is shown. Referenced-object entries are recorded when a program is created or updated with UPDPGM or UPDSRVPGM, so names may differ from current objects if objects were moved or an override was in effect.
Allowed environments: *ALL.
Positional parameters: 2.
Restrictions
- Requires object operational (*OBJOPR) authority for the program. Only libraries named in the library qualifier for which you have *EXECUTE authority are searched for programs.
Parameters
PGM
Program
Specifies the programs whose information is shown. This is a required parameter. Qualifier 1 is the program name (or generic name); qualifier 2 is the library.
*ALL- As program name: information for all programs and query definitions in the library or libraries. As library: all libraries on the system, including QSYS.
*LIBL- Searches all libraries in the thread's library list until the first match.
*CURLIB- Searches the current library for the thread, or QGPL if none is set.
*USRLIBL- Searches the current library (if set) and the libraries in the user portion of the library list.
*ALLUSR- Searches all user libraries, excluding most libraries whose names begin with Q and certain IBM-supplied libraries such as #COBLIB.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Program
Program
Suggested / special values:
*ALL
Library
Library
Suggested / special values:
*LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL
OUTPUT
Output
Specifies where the output from the command is sent.
Allowed values:
*, *PRINT, *OUTFILE
*- Displayed if requested by an interactive job, or printed with spooled output if requested by a batch job.
*PRINT- Printed with the job's spooled output.
*OUTFILE- Directed to the database file specified in OUTFILE.
OBJTYPE
Object type
Specifies the object type for which information is displayed.
Allowed values:
*PGM, *ALL, *SQLPKG, *SRVPGM, *MODULE, *QRYDFN
*PGM- Only the first program information is displayed.
*ALL- All versions of the program information and SQL package information are displayed.
*SQLPKG- Only SQL package information is displayed.
*SRVPGM- Service program information is displayed.
*MODULE- Module information is displayed.
*QRYDFN- Query definition information is displayed.
OUTFILE
File to receive output
Qualified parts (object, then library; write LIBRARY/OBJECT)
File to receive output
File to receive output
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OUTMBR
Output member options
Elements in order
Member to receive output
Member to receive output
Suggested / special values:
*FIRST
Replace or add records
Replace or add records
Allowed values:
*REPLACE, *ADD
Examples
DSPPGMREF PGM(LIBRARY1/BILLING) OUTPUT(*PRINT)
Creates a list of system objects referenced by the BILLING program in LIBRARY1, with output spooled for printing.
Generated from os/cl/catalog/DSPPGMREF.json and os/cl/help/DSPPGMREF.json.