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



On 24-Jan-2014 11:21 -0800, Gerald Kern wrote:

We have a homegrown utility that will take a file name and use that
to determine any dependent logical files and build a list of
physical/logical file names and then search the system source code
for their use.

The second step is to also search any queries that might be using the
file or one of its logicals.

To search the queries we issue a DMPOBJ OBJ(YOURLIB/YOURQRY)
OBJTYPE(*QRYDFN) command which produces a spool file that we can then
copy to a data file and scan the data file for the file name(s).

So we ran this utility last night it reported a file name being used
by a query, but when we examined the query we found there was only
one file used in the file selection, and that file didn't have any
dependent logical files on that physical.

What was extracted from the dump might not be what is visible in the dump; i.e. a bug in the program(s) extracting and\or reporting.

Send me the Dump Object output, or place it on code.midrange.com, and I will review it for any anomalies.

So we are kind of stumped as to why the dump shows a file being used
that clearly isn't. Could this dump data be residual from perhaps an
earlier use where maybe the file name seen in the dump was used in
this query?

If the information was obtained from the "Specify Files" section, then unless the *QRYDFN object was patched or possibly i saved with errors, then there should be no residual information because the design of Query/400 has the object created in compacted individual /sections/ of information.

Or is there a better way to determine what queries use a file (and or
its associated logical files)?

In order of my preference, I suggest: DSPPGMREF [assumes a prior release *QRYDFN object was updated with an IBM-supplied utility or by 2=Change+Save=Yes from WRKQRY], RTVQMQRY, RTVQRYF utility [search the web for that], and although I am loathe to suggest it... the Print Query Definition effective API.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.