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



Y'all, RTVQMQRY can extract the SELECT statement from a *QRYDFN, but that is all. And the only join type it will handle correctly is type 1 - Matching records.

But you cannot get any certain information about what a *QRYDFN uses for output, because it can all be overridden in the RUNQRY command. You can't even trust the input file names, because you can specify a differentset of QRYFILEs on RINQRY. All the queries in iDoctor, e.g., are defined over files and libraries that exist only on some system in Rochester. The files they read, and the files where the output goes, or whether it is printed, are all handled in RUNQRY. It really makes it hard to reverse engineer.

The suggestion to look at the various RUNQRY statements in your CL (and other using QCMDEXC) code may be the best bet. Nothing else is guaranteed. The files listed in the query definition do not have any guaranteed relationship with the final use of the query.

HTH
Vern

At 02:17 PM 6/24/2004, you wrote:
>Peter,
>That doesn't work for me.
>I picked a regular ole query and hit enter and got:
>
>RTVQMQRY QMQRY(LEEQUERY/DPBINVLOC) SRCFILE(ISSRCEP/QQRYSRC)
>Object DPBINVLOC in library LEEQUERY not found.
>EXPORT QUERY command ended due to error.
>RTVQMQRY command failed.
>The query is DEFINITELY in that library but this command defines whatever
it
>is looking for as a type *QMQRY (?)
>Chuck

You need to specify ALWQRYDFN(*YES).  Besides, I understood that Jerry was
looking for this.  However, never mind.  This command will not tell if a
file is been used and obviously not even if it is been replaced or having
new records coming in.  However, if you know how to "automagically" print
a query definition (which I have seen in the midrange list been
addressed), then what I will also recommend is to:

Prepare a CL to create a work file with all *QRYDFN objects
Read each object name and print the *QRYDFN
Copy the spooled file into a database file
Goto step 2 until *EOF
Search on the database file for the output definition information of all
*QRYDFN objects in that library or libraries.

Peter Vidal
PALL Aeropower Corporation
SR Programmer Analyst
5775 Rio Vista Drive
Clearwater, FL 33760-3137
(727)539-8448
www.pall.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.