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



Hi Sam

I have a feeling that the use of temp outputs is not limited to QMQRY - in STRSQL and set to put output to a file, I have to think it does the same thing. I can't swear by that, but it makes some sense, and I think I've seen it.

If what you want is to see results, as Rob mentioned, the create table approach requires you further to use DSPPFM or RUNQRY () - the latter is become my favorite quick file viewer, BTW.

LOL - I just about can't imagine writing something without using QMQRY - there are enough WRKDBF things out there, and the SEQUEL product is out there too, although it may use some SQL stuff.

Regards
Vern

On 11/15/2012 4:50 PM, Sam_L wrote:
Vern,

Virtually all the homegrown products use QMQRY under the covers. (Yes,
I have one as well.)

If you run QMQRY to an outfile, I think you'll find that it processes
the result set twice, once to put it to a temp file, then a second time
to put it to your outfile. At least it used to work this way and it
could be significant overhead if you had a large result set. You can see
it happening if you watch the open files with a large result set.

That's why I mentioned the create table as (select ...) approach.

If you don't use QMQRY, then I think you'd have quite a bit of
development effort to determine the data types of the result set and
build an output file from them. (Of course, you'd think that IBM would
have all that code somewhere in a re-useable form...)

Whatever, IBM RUNSQL doesn't support outfiles.

Sam

On 11/15/2012 8:04 AM, Vernon Hamberg wrote:
Hi Sam

Since I've written several of these SQL statement processors on my own
and now the ones we have in our products, I can't agree that putting in
OUTPUT parameters is all that difficult.

It's easy to use an API to get the exact parameter definitions from the
STRQMQRY command, for example. Or just look at a prompt and imitate it -
close enough.

Then it's simply a matter of passing the value to the STRQMQRY command
in the command-processing program for your command.

Even using the QM commands directly instead of STRQMQRY, this is pretty
trivial stuff, seems to me. But I've been playing with this for years,
so maybe I'm jaded!!

Regards
Vern


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.