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



No source for WRKQRY, unlike DFU.

The RTVQMQRY command, as Alan pointed out, will retrieve the SQL. It will not provide you with the output device (printer, crt, or even database file) nor the output layout.

There are a couple of utilities out there (DSPQRYF and DSPQRYD) that do provide a bit more information, but still do not create source file members. I think that are available at SystemiNetwork. I use the former frequently to find out where a file is used in queries when I have to change the layout of the table.


* Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



John Candidi wrote:
Dumb question. When I create a query using WRKQRY, is there a source file
automatically created somewhere? Let's say I create INV1 query in mylib,
where is the source file and what is it called?

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Tuesday, July 03, 2007 12:55 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Query/SQL/Excel
<snip>
So the question is what SQL 'editor' can I use to sit between an ODBC
connection to the iSeries and Excel? I realise this is not necessarily
an
iSeries specific question, but I can't be the only person here who wants
to
do this,
</snip>

You can have the best of both worlds.
Create a query using WRKQRY and then do a:

RTVQMQRY QMQRY(YOURQRY) SRCFILE(MYLIB/QSRCF) ALWQRYDFN(*YES) This retrieves the sql for a given query.
The other better solution to anything that accesses the AS/400 from the
PC is use a stored procedure. Encapsulate all the processing in the
stored procedure (RPG or SQL language) and just call if from Excel.
Excel just gets the results.



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.