Display Program (DSPPGM)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Display Program (DSPPGM) command displays information about a program. The display includes information about the compiler, the source from which the program was created, certain processing attributes of the program, the size of the program, and the number of parameters that must be passed to the program when it is called.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
PGM Program Qualified object name Required, Positional 1
Qualifier 1: Program Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTPUT Output *, *PRINT Optional, Positional 2
DETAIL Detail Single values: *ALL
Other values (up to 7 repetitions): *BASIC, *SIZE, *MODULE, *ACTGRPEXP, *ACTGRPIMP, *SRVPGM, *COPYRIGHT
Optional
Top

Program (PGM)

Specifies the program for which information is displayed.

This is a required parameter.

Qualifier 1: Program

name
Specify the name of the program.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is used to locate the program. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the name of the library where the program is located.
Top

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

*
The output is shown (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
*PRINT
The output is printed with the job's spooled output.
Top

Detail (DETAIL)

Specifies the type of information displayed for the service program. More than one value can be specified, but a list of values must not include *ALL. *ALL must be specified as a single value.

Note: DETAIL(*ALL) or DETAIL(*BASIC) are the only values valid for original program model (OPM) programs. All values other than *ALL or *BASIC are ignored for an OPM program.

*ALL
All of the DETAIL information types (*BASIC, *SIZE, *MODULE, *SRVPGM, *ACTGRPEXP, *ACTGRPIMP, and *COPYRIGHT) are shown on the display. If the user has chosen the information to be displayed on the screen, the user can scroll through the information for each DETAIL, but will have to press Enter (or PF12) to go from DETAIL to DETAIL.
*BASIC
General program information is shown.
*SIZE
The size and size limits for this program are shown.
*MODULE
A list is shown of the module objects bound by this program. The library shown for each module is the library that the module was in when the program was first created. If the module has been replaced by a module from a different library, this library name remains the name of the library that the module was in when the program was created. To determine the source that the module was created from, use option 5=Display description to see the source file, library, and member names.
*SRVPGM
A list is shown of the service programs bound by this program.
*ACTGRPEXP
A list is shown of the data items exported to the activation group specified in the data export entry in the binding specifications.
*ACTGRPIMP
A list is shown of the imports that are resolved by weak exports that had been exported to the activation group directory.
*COPYRIGHT
A list is shown of the copyrights for this service program.

Note: The DETAIL values *SIZE, *MODULE, *SRVPGM, and *COPYRIGHT are valid only for integrated language environment (ILE) programs. Specifying one of these values for an original program model (OPM) program results in the *BASIC information being shown.

Top

Examples

Example 1: Displaying Program Information

DSPPGM   PGM(LIB01/PAYROLL)

This command displays information about the program named PAYROLL in library LIB01. The display is shown at the display station if requested by an interactive job, or printed if requested by a batch job.

Example 2: Printing Program Information

DSPPGM   PGM(CUSINQ)  OUTPUT(*PRINT)

This command displays information about a program named CUSINQ. The library list is used to find the program, and the information is printed.

Top

Error messages

*ESCAPE Messages

CPF2150
Object information function failed.
CPF2151
Operation failed for &2 in &1 type *&3.
CPF8122
&8 damage on library &4.
CPF8123
Damage on object information for library &4.
CPF8129
Program &4 in &9 damaged.
CPF9803
Cannot allocate object &2 in library &3.
CPF9806
Cannot perform function for object &2 in library &3.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9811
Program &1 in library &2 not found.
CPF9820
Not authorized to use library &1.
CPF9821
Not authorized to program &1 in library &2.
CPF9830
Cannot assign library &1.
CPF9871
Error occurred while processing.
Top