× 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.



Rich

At 05:56 AM 11/21/97 PST, you wrote:
>Is there a way I can get a list of the files used and created by queries 
>like I can with programs using the DSPPGMREF command?

No neat way, but 2 or 3 ideas:

1.      RTVQMQRY QMQRY(QUERY_LIB/QUERY_NAME)
         SRCFILE(SOME_LIB/QQMQRYSRC)
         ALWQRYDFN(*ONLY)

        This command will put the SQL statement that is equivalent to
        the query into SRCFILE. QQMQRYSRC needs to be created with
        RCDLEN(91).

        The result looks like this:

        H QM4 05 Q 01 E V W E R 01 03 97/11/21 10:13
        V 1001 050 Demonstrate RTVQMQRY
        V 5001 004 *HEX
        SELECT
          ALL       T01.LNNAME, T02.XAADR1, T02.XAADR2, T02.XAADR3, T02.XAADR4,
                    T02.XAADR5
          FROM      MTEDGE2DTA/FMLNDRP T01,
                    MTEDGE2DTA/XADDR T02
          WHERE     LNM#AD = XA#ADR

        The first 3 lines are irrevelant—part of Query Management language.
        The lines beginning at FROM contain the files used, with an alias.
        BTW, it's possible for the file and library names to be surrounded
        by quotation marks.

        Anyway, this could provide the basis for an automated approach:

        a.      DSPOBJD ... OBJTYPE(*QRYDFN) ... OUTPUT(*OUTFILE) ...
        b.      Execute RTVQMQRY for each *QRYDFN found
        c.      Read through each resulting source member, either in RPG,
                say, or a called CL (RCVF)

2.      Go through the list from WRKQRY, selecting opt 6 on each,
        copying each spooled file to a file in turn, ...

        Come to think of it, not a great process, compared to above.

3.      DMPOBJ for each *QRYDFN on system and find where files are listed.
        Could be automated, similar to 1. above.

Just some thoughts


Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN 55401
(612) 371-1111 x480


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.