DSPPGM (Display Program) Command Description
Purpose
The Display Program (DSPPGM) command displays information about a program. The display includes information about the compiler, certain processing attributes of the program, the type of program (ILE or OPM), the size of the program, and the number of parameters that can be passed to the program when it is called.
Restrictions:
- You must have *READ authority to the program and *EXECUTE authority to the library to use this command.
- You must have *USE authority to the program when DETAIL(*MODULE) is specified.
Required Parameter
- PGM
- Specifies the qualified name of the program for which information is displayed.
The name of the program can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
program-name: Specify the name of the program for which information is displayed.
Optional Parameters
- OUTPUT
- Specifies whether the output from the command is shown at the requesting workstation or printed with the job's spooled output. More information on this parameter is in commonly used parameters.
*: Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
*PRINT: The output is printed with the job's spooled output.
- 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) would be shown on the display. If the user has chosen the information to be displayed on the screen, the user would be able to scroll through the information for each DETAIL, but would 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, *ACTGRPIMP, *ACTGRPEXP, 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. Examples for DSPPGM
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.
Error messages for DSPPGM
*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.