elehti@xxxxxxxxxxxxxxxxxx wrote:
Lest we forget the secret way to get to SQL statements
that Query/400 (WRKQRY) uses in *QRYDFN objects:
http://www.itjungle.com/fhg/fhg052604-story01.html
RTVQMQRY QMQRY(library/query)
SRCFILE(library/QQMQRYSRC)
SRCMBR(*QMQRY)
ALWQRYDFN(*ONLY)
When this command completes, you will be able to view
or edit the generated SQL statement as you would any
other source file member
First I congratulate you on being the only one I have ever seen
to post ALWQRYDFN(*ONLY) without my having to stress that as a
likely intended correction; even if it was copied from an article
:-) Many have been confused after CRTQMQRY of the same name as the
*QRYDFN object, when later attempts to RTVQMQRY ALWQRYDFN(*YES)
[*YES is the default; e.g. if the parameter is omitted] did not
reflect recent changes [e.g. to add a /variable/] in the *QRYDFN
object because the request defaults to first look for a *QMQRY
object by that name.
As others have mentioned, take care in its use. However in those
messages there was a failure to mention, as with the article, that
the /warnings/ for what will be lost in the transition are given by
using the ANZQRY command.
Oddly there was also no mention of RTVQMFORM, even though QMFORM
was mentioned in the article. That is a bit much to digest though,
because the output is not easily explained nor discussed.
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.