• Subject: RE: Query conversion
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Wed, 8 Sep 1999 17:58:20 -0400

Dan,

>My experience trying to reproduce Query's printed 
>output using RTVQMQRY, RTVQMFORM, 
>CRTQMFORM, CRTQMQRY, and STRQMQRY 
>has usually left me exasperated to the point where 
>I just finally throw up my hands and re-do the whole 
>thing using OPNQRYF to get the data, and feed it 
>into an RPG report program to print the dang thing.  
>Note that the only reason I'd ever do this is because 
>a user requires a front-end data selection prompt to 
>select the data to print on the report.  

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)             
         ALWQRYDFN(*YES)           
         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 MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.