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

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.

Type
*QUAL
Required
Yes
Case
Uppercase
*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

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL

OUTPUT Output

Specifies where the output from the command is sent.

Type
*CHAR
Required
No
Default
*
Length
8
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*PGM
Length
7
List limit
5
Case
Uppercase

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

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

File to receive output File to receive output

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OUTMBR Output member options

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Member to receive output Member to receive output

Type
*NAME
Required
No
Default
*FIRST
Length
10
Case
Uppercase

Suggested / special values: *FIRST

Replace or add records Replace or add records

Type
*CHAR
Required
No
Default
*REPLACE
Length
8
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/DSPPGMREF.json and os/cl/help/DSPPGMREF.json.