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


  • Subject: RE: Passing parameters to a query
  • From: "Dan Bale" <dbale@xxxxxxxxxxx>
  • Date: Tue, 22 Jun 1999 16:04:09 -0400



A "regular" query, one created/modified using WRKQRY, is unable to accept
parameters.

If you convert such a query into a QM query, you can setup variables into the
query source and pass parameters to them from a HLL pgm.  However, IMHO, this is
a really UGLY thing!  It is not something I would want to give to a user.  I
have used it, reluctantly, and they are hard to debug, and some features of
regular queries are lost in the conversion.

Christopher's suggestion of using OPNQRYF is good as long as you realize that
you have to use CPYFRMQRYF after the OPNQRYF to get the data into a physical
data file; big files could eat up a lot of resources.  If this is the case, I'd
just as soon scrap the query and write an RPG program to process the OPNQRYF'd
data.

- Dan Bale


>>I never could figure that out.  I use opnqryf to select data and build in
qtemp.  Then run query over qtemp to format & print report.  No selection
are then coded in the query.

Christopher K. Bipes

-----Original Message-----
From: keshava narasimha [mailto:anandthirta@hotmail.com]
Sent: Tuesday, June 22, 1999 9:31 AM
To: RPG400-L@midrange.com
Subject: Passing parameters to a query


Hi there !

How can you pass parameters to a query?

Thanks.

Keshav<<





* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  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.