This topic shows you how to run IBM i queries from Robot Schedule by passing in dynamic parameters, such as the current date. It uses Query Management features with Robot Schedule Reserved Command Variables. There is a query called QUERY in library DAN, which creates a list of all OPEN calls older than a certain date. The example schedules a weekly query in Robot Schedule and lists all open calls greater than four weeks old.

  1. Create the query and make record selections using dependent values for the variable you want to dynamically change in Robot Schedule.

    Note: Use a colon before the value to make it a dependent value.

  2. Press Enter to display the screen shown below. Fill in as shown (DUMMY query does not need to exist in LIB DAN). Press Enter, then exit and save your query.

  3. Go into Robot Schedule and create a Command type job. Fill the command STRQMQRY with the parameters shown below. For this example, a Reserved Command Variable has been created to calculate current date minus 28 days (@@DATEM28).


When you run the Robot Schedule job, the Reserved Command Variable @@DATEM28 is replaced with the correct value and the query is given that value.


Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case