20 pts.
 How do I start a query on AS/400 with a parameter
Can I start a query on AS/400 and give a variable or a parameter to that query for record selection (RCDSLT)?

Software/Hardware used:
AS/400 Query400
ASKED: January 18, 2012  2:29 PM
UPDATED: March 17, 2012  5:34 AM

Answer Wiki:
With the standard AS400 Query product you can RUNQRY *N yourlib/yourfile RCDSLT(*YES) This will bring up the rcdslt propmt screen. If you want to pass a parm you need to use Query Manager I have solved this problem by using the STRQMQRY command and the SETVAR parameter.
Last Wiki Answer Submitted:  January 18, 2012  3:50 pm  by  CharlieBrowne   32,785 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,785 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

i think, just use WRKQRY to make report, after run your query….

 3,740 pts.

 

Review the Query reference manual for the use of ‘dependent values’. Since you need to have the Query for i product in order to have the current reference manual, and I don’t have the product, you’ll have to tell me how to do it. (You do have the manual, right?)

But ‘dependent values’ were intended to be used in queries for the Office Vision product which is no longer available. In order to use those queries, you have to execute them with Query Manager. You execute them the same way you would execute a normal QM query with parameters — with the STRQMQRY command.

And since it’s easier to create QM queries that accept parameters than to create Query for i queries (and you can create QM queries without licensing an additional product that is less capable and harder to use than QM), and QM queries can be created on more systems than Query for i queries, why would you ever use Query for i?

BTW, if you want to use a Query for i query with parameters, you can’t use the RUNQRY RCDSLT() parameter.

Tom

 107,695 pts.