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

You're quite right, I would have to create the QMQRY as you point out, so
I'd have about the same amount of maintenance as an RPG, although I think it
would be slightly simpler to maintain.

Why didn't I remember the CRTQMQRY step - it's quite an oversight !

Regards
Evan harris

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, 18 April 2008 11:47 a.m.
To: Midrange Systems Technical Discussion
Subject: Re: Simplest Way to run SQL in a CL?

Evan Harris wrote:
Hi Scott

If I use an RPG I now have to code and compile an additional program and
recompile every time I want to change my SQL. If I use a QM Query I simply
have to edit the QM Source member with the SQL statement.


Wouldn't you also have to recompile your QMQRY source the same way you
recompile your RPG program?!?! By your logic, RUNSQLSTM would be
simpler, since it doesn't have to be compiled like QMQRY does...

Unless I'm confused, you have to run CRTQMQRY to compile a QM Query.


The QM Query approach is primitive but effective if you just want to run a
query - and it nicely externalises the SQL from the CL.

You're right... I just re-read the original message. I didn't notice
the first time around that he wanted the results to go to a physical
file! I thought he wanted to read the results into variables in his CL
program.

In that case, RUNSQLSTM or QMQRY would definitely be easier than using
data queues.

however, I should point out that if you don't need to get the results in
your CL program, you don't need to use a data queue, either... the
point behind the data queue was PURELY that you could get the input into
your CL program via a data queue.



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.