ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Finding out what library a pgm is stored in.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Finding out what library a pgm is stored in.

    Is this possible?

    I know the pgm name from the menu command that triggers
    call pgm(pgmname)

    ​​​​​​But I don't know the library in which it's containcontained

    Any ideas?
    Thanks

  • #2
    If it is an interactive program, then, while the program is running, do a System Request 3 from your terminal emulator, and then select option 11 from the Display Job menu to look at the call stack. The library name will be to the right of your program name.

    You can also issue the following command from the os/400 command line to find all copies of the program on the box: wrkobj *all/pgmname *pgm

    Of course, this second option will not tell you which one is running if there are more than one of the object on the system.

    Walt

    Comment


    • #3
      It will be determined by the *LIBL at the time of execution. If the program only exists in a single library, then there's your answer.

      Comment


      • #4
        After you run WRKOBJ *all/MyProgram *pgm

        You can select 8 - Object Description

        (Or DSPOBJD followed by option 5)

        Then look to see when the different copies of the program were last used.

        Comment

        Working...
        X