Find source attributes using the Display Program command

Many times you need to find the source (file/library/member) that was used when an object was created. When you use the display object description command dspobjd to retrieve the service related attributes the resulting information for the source member and source file and library is sometimes blank. According to the dspobjd source file help, for ILE *PGM and *SRVPGM objects the source file/library/member fields are supposed to be blank as this information is stored with the *module object. This can cause confusion when no *module object exists.

A simple solution is to use the display program command dsppgm. When used properly the display program command will almost always provide the location of the original source information.

dsppgm mylib/mypgm

Typing dsppgm along with the program name and pressing Enter presents the program information screen "display 1 of 7". Pressing Enter twice takes you to the "display 3 of 7" screen which allows input of option '5=Display description'. Typing option 5 and pressing Enter presents the "module attributes" along with the name and location of the source used when creating the object.

The source information is also available for copies of the original object. That is, if a program object is duplicated (e.g. copied using crtdupobj) using dsppgm for the new copy the original source information will display.