IBM Support

How to Find the Source a Program is Compiled From

Troubleshooting


Problem

When a program is compiled, the source location at compile time is saved in the object.

Resolving The Problem

When a program is compiled, the source location at compile time is saved in the object.
Note: If the source is moved or deleted after the object is compiled, the information in the program/module object is not updated.

The source location can be found in various ways, depending on if it is an ILE program or an OPM program.

ILE Program Methods

Use the DSPPGM command and go to the module information for the program. Type 5 next to the desired module to see the source location.

The following APIs can also be used:

o List ILE Program Information QBNLPGMI API
Format PGML0100 will give you the ILE program module information, including source file and member information.

o List Service Program Information QBNLSPGM API
Format SPFL0100 will give you service program module information, including source file and member information.

In SQL, the BOUND_MODULE_INFO view can be used to display the same information.

OPM Program Methods

The DSPOBJD command will show the source location.
The following APIs can also be used:

o Retrieve Program Information QCLRPGMI API

o Retrieve Object Description QUSROBJD API
In SQL, the OBJECT_STATISTICS table function will retrieve the same information.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHtAAM","label":"Programming ILE Languages"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

595783337

Document Information

Modified date:
29 May 2025

UID

nas8N1011590