× 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 1/26/11 6:44 AM, Vern Hamberg wrote:

Did you look at the help text for the command? You would have seen
right at the start that the command shows OBJECTS referred to by the
program. Queries are not objects. I think it will list the objects
used in queries, if known or knowable.

On 1/26/2011 8:24 AM, David FOXWELL wrote:

I thought that at V6.1 DSPPGMREF on a program would show all the
qry executed by that program. ?

If by "qry", *QRYDFN was meant, then indeed each of such "Queries" is an "object" in the IBM i OS Vernacular [pun intended :-) ]. From the supporting text, admittedly it seems clear that Vern did not mean to imply that "Queries [Definitions] are not objects." Instead meaning to suggest only that the Query [Definition] external object type is not named in the command help text as one of the "system objects provided" for as output of the command. The *QRYDFN is not itemized with any of the supported "programs types" listed.

While a Query Definition is much like a [report] program, there is no support for access to a *QRYDFN by the CALL command [or even the CALLX MI instruction]. DSPPGMREF is used to report references to called "programs" or objects accessed for its data [e.g. *FILE or *DTAARA] input and\or output. Since the *QRYDFN is neither a program nor used for program I\O, that object type is not a good fit for DSPPGMREF as a referenced object.

However note that the optional output file for a *QRYDFN may be included in DSPPGMREF output for the CLP and CLLE. The OUTFILE() parameter of the RUNQRY command is defined with the PARM FILE(*OUT). But only when the file is named on the parameter, will an actual file name appear in the DSPPGMREF output. Hmmm, I had thought the QRYFILE parameter was defined with PARM FILE(*IN), but a quick test of the DSPPGMREF did not show any named file as input.?

FWiW... only the CLP [the help text incorrectly noted CL in older releases] and CLLE of the supported "program types" could legitimately be expected to have any possibility of support for *QRYDFN as a referenced object. That is because [effectively] only CL commands may access the Query Definition object, so only a CL[LE] program could directly refer to that external object type via CL command strings; likely only via those commands which supported either an OBJ() or QRY() [perhaps also QMQRY() for commands also having an ALWQRYDFN()] parameter for which a [qualified] Query/400 Query Definition can be named. For example one might expect that a CLP having the [unquoted] command string "RUNQRY QRY(MyLib/MyQryDfn)" as a compiled source statement should present in the output of DSPPGMREF that the *QRYDFN named MYQRYDFN in library MYLIB was referenced... If such support existed. Conceptually such tracking would be beneficial across all types and naming to provide a much more extensive where-used capability rather than being limited only to called programs and data references. Certainly more possible today than in the past.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.