How do I start a query on AS/400 with a parameter

20 pts.
Tags:
AS/400
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • pdsathishkumar
    i think, just use WRKQRY to make report, after run your query....
    3,790 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following