× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



To follow up on this idea:
Let's say you have all your programs and related objects in one library; in this example I will use QGPL.

Create a cross-reference database as follows:
    DSPPGMREF PGM(QGPL/*ALL) OUTPUT(*OUTFILE) OBJTYPE(*ALL) +       OUTFILE(QTEMP/DSPPGMREF) OUTMBR(*FIRST *REPLACE)

Then, using SQL, you can run the following queries:
#1. find all programs called by "PGMX":
    SELECT * FROM qtemp/dsppgmref WHERE WHPNAM = 'PGMX'
                        AND WHOBJT = 'P'          


#2. to see all objects used by "PGMX":

    SELECT * FROM qtemp/dsppgmref WHERE WHPNAM = 'PGMX'    


#3. find all programs that call (use) "PGMX":

    SELECT * FROM qtemp/dsppgmref WHERE WHFNAM = 'PGMX'

That should get you started ...

NOTE: If you have programs and files in several different libraries, you can create one big cross-reference file, by adding more data to the file, as follows:
DSPPGMREF PGM(library/*ALL) OUTPUT(*OUTFILE) OBJTYPE(*ALL) +    OUTFILE(QTEMP/CHMPGMREF) OUTMBR(*FIRST *ADD)    
repeat for each "library" name as needed.   (Lather, rinse, repeat.)


You could also create your cross-reference file in a permanent library, versus QTEMP -- then you need a methodology to periodically "refresh" it.


HTH,
Mark S. Waterbury

On Tuesday, March 23, 2021, 4:52:15 PM EDT, Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:

Basically what I suggested in an earlier reply. With a kind of recursive
walk through the trees.

On 3/23/2021 12:25 PM, Justin Taylor wrote:
True.

We run this command nightly.  Since it does all programs, it would be
easier to see both the upstream and downstream from a given object.
DSPPGMREF PGM(*ALLUSR/*ALL) OUTPUT(*OUTFILE) OBJTYPE(*ALL)
OUTFILE(DSPPGMREF)



date: Mon, 22 Mar 2021 13:06:21 -0500
from: Vern Hamberg <vhamberg@xxxxxxxxxxxxxxx>
subject: Re: Command / utility for called program

That? can be the start I recommended - OP wants to get what is called by
caller by caller, etc. A bit of work, to be sure, but doable.

On 3/22/2021 12:21 PM, Justin Taylor wrote:
How about this?
QSYS/DSPPGMREF OUTPUT(*OUTFILE)




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.