Question

  Asked: Feb 25 2008   7:49 PM GMT
  Asked by: Abbey


Passing parms to Query400


iSeries, AS/400, AS/400 Query

Has anyone ever come across a method of passing a parm into a query run - such as a date?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0



Go into your query and select 'Select records'

If the date field in your file is named MyFileDate then use a selection of 'MyFileDate EQ :input' (notice the colon before my made up name of input)

On the Specify Dependent Value Qualifiers panel specify '1' (Query) and type in the name of your query

Save your query

Run your query using the STRQMQRY command. If your query is name MyQuery and the date you want to pass for record selection is '022608' use:

STRQMQRY QMQRY(MYQUERY) ALWQRYDFN(*YES) SETVAR((INPUT '022608'))

Bruce Vining
http://www.brucevining.com/
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register