Every thing I've learned about SQL I've learned from using RTVQMQRY. It's
not much, but it's made my life easier. I've saved hours of work with
queries that accept parameters.
You can run into problems with the different ways QMQRY and Query400 handle
summary only and output to a file. I never remember them until I run into
them and start swearing. I agree with you about the forms--but...the real
fun is when you want to modify them in the ways that QMQRY supports and
This could result in something like the "make both my hands the same" joke
if I got my wish, but I'd love to see QMQRY and Query400 behave the same.
> -----Original Message-----
> From: Buck Calabro [mailto:email@example.com]
> Sent: Wednesday, September 08, 1999 2:58 PM
> To: 'MIDRANGE-L@midrange.com'
> Subject: RE: Query conversion
/********** Snip *********/
> Try RTVQMQRY to get at the SQL for your QRY/400. Insert
> variables in it
> like so:
> SELECT fld1,fld2 FROM file WHERE status=&STATUS
> Compile it, and when you run it with STRQMQRY, specify:
> STRQMQRY QMQRY(QRY400)
> SETVAR((STATUS &CLVAR))
> If you name the QMQRY the same as the QRY/400, it'll use the
> formatting from
> the QRY/400 and the SQL from the QMQRY. It may help, or it may not.
> Basically, as long as your QMQRY returns the same columns as
> the QRY/400 you
> should be in good shape.
> Buck Calabro
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> | Questions should be directed to the list owner/operator:
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: firstname.lastname@example.org
This mailing list archive is Copyright 1997-2019 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